This topic has 12 replies, 5 voices, and was last updated 8 years, 1 months ago ago by Eva Kemp
Hi, i wanna insert one or more tabs in the product page, what can i do? thanks
Hello,
Please read here how to add custom tabs:
https://docs.woocommerce.com/document/editing-product-data-tabs/
Regards,
Eva Kemp.
I try to upload a child theme for insert a php code for custom tabs in the functions.php but if i activate a child theme appear a code error. I put my credential in private, thanks
Hello,
That was just a warning. You can ignore it. I’ve activated child theme and your site is working fine.
Please check.
Regards,
Eva Kemp.
I insert this code in the functions.php file :
add_filter( ‘woocommerce_product_tabs’, ‘woo_new_product_tab’ );
function woo_new_product_tab( $tabs ) {
// Adds the new tab
$tabs[‘test_tab’] = array(
‘title’ => __( ‘New Product Tab’, ‘woocommerce’ ),
‘priority’ => 50,
‘callback’ => ‘woo_new_product_tab_content’
);
return $tabs;
}
function woo_new_product_tab_content() {
// The new tab content
echo ‘<h2>New Product Tab</h2>’;
echo ‘<p>Here\’s your new product tab.</p>’;
}
But i don’t see a new tab in the product page…
Hello,
As I see the new tab is there. See screenshot: http://prntscr.com/cqve2e
Regards,
Robert Hall
oK BUT HOW CAN I INSERT TEXT INSIDE?
Hello,
You can write text content in this function:
function woo_new_product_tab_content() {
// The new tab content
echo ‘<h2>New Product Tab</h2>’;
echo ‘<p>Here\’s your new product tab.</p>’;
}
Regards,
Rose Tyler.
But i wanna a different content for each product, it’s possibile?
Hello,
You can try this plugin https://wordpress.org/plugins/woocommerce-custom-tabs/ or search for other Woocommerce extensions that may help you.
Best regards,
Jack Richardson.
ok thanks…
Hello,
You’re welcome.
Regards,
Eva Kemp.
The issue related to '‘Insert another tabs in the product page’' has been successfully resolved, and the topic is now closed for further responses