Insert another tabs in the product page - by Greta

This topic has 12 replies, 5 voices, and was last updated 8 years, 1 months ago ago by Eva Kemp

  • Avatar: Greta
    Greta
    Participant
    October 6, 2016 at 11:49

    Hi, i wanna insert one or more tabs in the product page, what can i do? thanks

    11 Answers
    Avatar: Eva
    Eva Kemp
    Support staff
    October 6, 2016 at 13:13

    Hello,

    Please read here how to add custom tabs:
    https://docs.woocommerce.com/document/editing-product-data-tabs/

    Regards,
    Eva Kemp.

    Avatar: Greta
    Greta
    Participant
    October 6, 2016 at 16:04

    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

    Please, contact administrator
    for this information.
    Avatar: Eva
    Eva Kemp
    Support staff
    October 6, 2016 at 18:48

    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.

    Avatar: Greta
    Greta
    Participant
    October 7, 2016 at 09:46

    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…

    Avatar: Robert Hall
    Robert Hall
    Support staff
    October 7, 2016 at 10:11

    Hello,

    As I see the new tab is there. See screenshot: http://prntscr.com/cqve2e

    Regards,
    Robert Hall

    Avatar: Greta
    Greta
    Participant
    October 7, 2016 at 11:27

    oK BUT HOW CAN I INSERT TEXT INSIDE?

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    October 7, 2016 at 12:07

    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.

    Avatar: Greta
    Greta
    Participant
    October 10, 2016 at 09:09

    But i wanna a different content for each product, it’s possibile?

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    October 10, 2016 at 10:02

    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.

    Avatar: Greta
    Greta
    Participant
    October 12, 2016 at 11:47

    ok thanks…

    Avatar: Eva
    Eva Kemp
    Support staff
    October 12, 2016 at 13:49

    Hello,

    You’re welcome.

    Regards,
    Eva Kemp.

  • Viewing 12 results - 1 through 12 (of 12 total)

The issue related to '‘Insert another tabs in the product page’' has been successfully resolved, and the topic is now closed for further responses

8theme customization service
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.