Remove description from tabs - by ycs7a - on WordPress WooCommerce support

This topic has 2 replies, 2 voices, and was last updated 6 years, 8 months ago ago by Rose Tyler

  • Avatar: ycs7a
    ycs7a
    Participant
    March 6, 2018 at 23:19

    Hi,

    In order to remove the word ‘DESCRIPTION’ from a tab every time I updated Woocommerce, I had to follow these steps.

    Find description.php which is found in wp-content/plugins/woocommerce/templates/single-product/tabs/
    In description.php you will delete:
    < ?php echo $heading; ?>
    From the code:

    < ?php
    /**
     * Description Tab
     */
     
    global $woocommerce, $post;
    
    if ( $post->post_content ) : ?>
    	
    	
    		< ?php $heading = apply_filters('woocommerce_product_description_heading', __('Product Description', 'woocommerce')); ?>
    		
    		
    < ?php echo $heading; ?>
    		
    		< ?php the_content(); ?>
    	
    	
    < ?php endif; ?>

    But now, I cannot find the this code in the new description.php. The description.php is now this:

    <?php
    /**
     * Description tab
     *
     * This template can be overridden by copying it to yourtheme/woocommerce/single-product/tabs/description.php.
     *
     * HOWEVER, on occasion WooCommerce will need to update template files and you
     * (the theme developer) will need to copy the new files to your theme to
     * maintain compatibility. We try to do this as little as possible, but it does
     * happen. When this occurs the version of the template file will be bumped and
     * the readme will list any important changes.
     *
     * @see 	    https://docs.woocommerce.com/document/template-structure/
     * @author 		WooThemes
     * @package 	WooCommerce/Templates
     * @version     2.0.0
     */
    
    if ( ! defined( 'ABSPATH' ) ) {
    	exit; // Exit if accessed directly
    }
    
    global $post;
    
    $heading = esc_html( apply_filters( 'woocommerce_product_description_heading', __( 'Description', 'woocommerce' ) ) );
    
    ?>
    
    <?php if ( $heading ) : ?>
    
    <?php endif; ?>
    
    <?php the_content(); ?>

    How can I remove the word ‘DESCRIPTION’ from every first tab in my single product page (see e.g. this product)?

    1 Answer
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    March 7, 2018 at 09:08

    Hello,

    You can simply add this code in Custom css:

    .single-product .tabs .tab-description h2:first-of-type {
        display: none;
    }

    Regards

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

You must be logged in to reply to this topic.Log in/Sign up

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.