New Landing How can we help? Themeforest Theme Support Neighborhood Remove 'Product Description' Accordion on product pages

Viewing 6 posts - 1 through 6 (of 6 total)
  • #165465
    GTS75
    Member
    Post count: 240

    Hi, I need to remove the Production Description accordion from ALL product pages. I’m using the product short description that appears above the product content and don’t want the blank description tab showing on the front end.

    Thanks

    Attachments:
    You must be logged in to view attached files.
    #165525
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please refer this article http://docs.woothemes.com/document/editing-product-data-tabs/. Hope it should help to you.
    Thanks
    Mohammad

    #165696
    GTS75
    Member
    Post count: 240

    Okay…I’m not good with editing php files so I just want to be sure I’m doing this right. If all I want to do is remove the description tab, I’d add this to the functions.php file?

    add_filter( ‘woocommerce_product_tabs’, ‘woo_remove_product_tabs’, 98 );

    function woo_remove_product_tabs( $tabs ) {

    unset( $tabs[‘description’] ); // Remove the description tab

    return $tabs;

    }

    And does it need to be the functions.php folder of child theme? Where in the file do I add it? Sorry for the questions, just don’t want to mess anything up.

    Thanks,
    Dan

    #165702
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    Add it in the bottom before the php closing tag in the end of functions.php

    
    ?>

    -Rui

    #165703
    GTS75
    Member
    Post count: 240

    Does it need to be the child theme?

    #165758
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Yes, because of theme updates.
    If you don’t have a child theme yet then your functions.php file content can be this one:

    <?php
    
    add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 );
    
    function woo_remove_product_tabs( $tabs ) {
    
    unset( $tabs['description'] ); // Remove the description tab
    
    return $tabs;
    
    }
    ?>

    -Rui

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register