Website Building » WooCommerce » How Do I Remove a Short Description in WooCommerce?

How Do I Remove a Short Description in WooCommerce?

Last updated on January 20, 2023 @ 1:19 pm

If you have a WooCommerce store, you may have noticed that there is a short description included on each product page. This is a default setting in WooCommerce, and it can be changed in the settings.

However, if you want to remove the short description from all of your product pages, there is a way to do this.

In order to remove the short description from all of your product pages, you will need to edit the code in the functions.php file of your child theme. If you do not have a child theme, you can create one by following the instructions here: https://docs.com/document/managing-woocommerce-themes/

Once you have created a child theme, or if you already have one activated, open the functions.php file in a text editor and add the following code:

remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 );

This code will remove the short description from all of your product pages. If you only want to remove the short description from certain products, you can use this code instead:

remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 );
add_action( 'init', 'remove_short_description' );
 function remove_short_description() {
  global $post;
   if ( has_shortcode( $post->post_content, 'product' ) ) {
    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 );
   }
 }

This code will remove the short description from all products that have the [product] shortcode in their content. You can use this code to Target specific products or product categories.

Conclusion:

In conclusion, if you want to remove the short description from all of your product pages on WooCommerce, you will need to edit the code in the functions. You can also use this code to Target specific products or product categories.

PRO TIP: If you are unsure about how to remove a short description in WooCommerce, it is best to consult with a professional. Attempting to remove a short description without knowing how can result in lost data or an incomplete WooCommerce store.
Morgan Bash

Morgan Bash

Technology enthusiast and Co-Founder of Women Coders SF.