Change single product tab - by bobvansoest

This topic has 13 replies, 3 voices, and was last updated 9 years, 6 months ago ago by Robert Hall

  • Avatar: bobvansoest
    bobvansoest
    Participant
    May 2, 2015 at 09:26

    Hello,

    I know i can use the code from woothemes, and where do I put these? I tried to put it in the style.css of my childtheme. nothing changed. I tried to put it in the custom.css and nothing changed.
    I want to put first the description, then ingredients, then how to use and last de review possibility.

    http://docs.woothemes.com/document/editing-product-data-tabs/

    Please help. Thanks!

    Best Regards,

    Bob

    12 Answers
    Avatar: bobvansoest
    bobvansoest
    Participant
    May 2, 2015 at 15:27

    ….and how can I use the Visual Composer on every single product Tab? Now I only can use Visual Composer on the tab description.
    Thanks!

    Gr. Bob

    Avatar: Eva
    Eva Kemp
    Support staff
    May 4, 2015 at 11:22

    Hello,

    You need put the code into functions.php file of your child theme and not in style.css.
    Please try it.
    Unfortunately there is no VC editor for all tabs. Sorry.

    Regards,
    Eva Kemp.

    Avatar: bobvansoest
    bobvansoest
    Participant
    May 4, 2015 at 19:47

    Thank you Eva. I tried and it worked. I changed it in the childtheme. Now I want to ad 2 tabs. I use the same code twice (see below). Unfortunately I get an error. Do I have to ad something?
    Second question. When I ad a tab, where can I ad the text of that particular tab? Can you help me?
    Thanks you! Gr. Bob

    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>’;

    }

    Avatar: bobvansoest
    bobvansoest
    Participant
    May 4, 2015 at 21:18

    ….another question..
    Under the tab description in the single product page there is line named “PRODUCT DESCRIPTION”. How can I delete this line? Unfortunately I cannot delete this line in Visual Composer.
    Thanks for you help!

    Regards,

    Bob

    Avatar: Eva
    Eva Kemp
    Support staff
    May 5, 2015 at 09:39

    Hello,

    What error are you getting?
    The tab content is added in this section of the code:
    `// The new tab content

    echo ‘

    New Product Tab

    ‘;
    echo ‘

    Here\’s your new product tab.

    ‘;

    }`
    Add this code in style.css of your child theme to remove “Product Description” title:

    #content_tab_description h2 {
      display: none;
    }

    Regards,
    Eva Kemp.

    Avatar: bobvansoest
    bobvansoest
    Participant
    May 5, 2015 at 10:16

    Thanks you very much Eva for your help. Iam getting close.Now I understand that I added a global tab. I would like to have two extra single products tabs that I can change per product

    Maybe you have an idea how i get the tabs in the following order where i can also change all the text per single product?

    Description
    (change text in Visual Composer)
    Ingredients
    (where to change the text?)
    How to use
    (where to change the text?)
    Review product
    (No changing needed )

    Regards,

    Bob

    Avatar: bobvansoest
    bobvansoest
    Participant
    May 5, 2015 at 10:38

    Iam sorry Eva, but I put this one in, but the tittle product description doesn’t go away.

    #content_tab_description h2 {
    display: none;
    }

    Here is mine CSS. Nothing in yet, so strange no?

    /*
    Theme Name: WooPress – 8theme WordPress theme Child
    Template: woopress
    Author: Child Theme Configurator
    Version: 1.0.1430817907
    Updated: 2015-05-05 09:25:07
    */

    @charset “UTF-8”;

    #content_tab_description h2 {
    display: none;
    }

    Regard,

    Bob

    Avatar: Eva
    Eva Kemp
    Support staff
    May 5, 2015 at 11:44

    Hello,

    Please try to change the code to

    #content_tab_description h2 {
    display: none !important;
    }

    Concerning custom tab you may try to use this plugin https://wordpress.org/plugins/woocommerce-custom-product-tabs-lite/ or this solution:
    http://www.benblanco.com/how-to-add-custom-product-tab-to-woocommerce-single-product-page/

    Regards,
    Eva Kemp.

    Avatar: bobvansoest
    bobvansoest
    Participant
    May 5, 2015 at 12:57

    Thanks Eva,

    #content_tab_description h2 {
    display: none !important;
    }

    Did you try it in the theme and is it working at your computer?
    For me this solution is not working unfortunately,

    Can I just delete it in HTML? Will it be gone when I update woocommerce or the theme?

    Regards,

    Bob

    Avatar: Eva
    Eva Kemp
    Support staff
    May 5, 2015 at 14:21

    Hello,

    It works on our side.
    Could you please upload your site to any web host to be able to check the issue?

    Thank you.
    Regards,
    Eva Kemp.

    Avatar: bobvansoest
    bobvansoest
    Participant
    May 6, 2015 at 20:59

    Hi Eva,

    thanks you very much. I put the script in the regular CSS. That worked. So I put it also in the child theme. I hope it stay that way, beceause when I put it only in the childtheme it doesnt work.
    Thanks for all the help!!!!!

    Regards,

    Bob

    Avatar: Robert Hall
    Robert Hall
    Support staff
    May 6, 2015 at 21:02

    Hello,

    You’re welcome!
    If you have any questions please feel free to contact us.

    Regards,
    Robert Hall.

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

The issue related to '‘Change single product tab’' 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.