In this article, we will discuss various methods to remove the product description tab in WooCommerce, providing you with step-by-step instructions. The product description tab is a common feature on WooCommerce product pages, but there are situations where you may want to remove it. Whether you want to streamline the appearance of your product pages or enhance the user experience by eliminating clutter, we’ve got you covered. We will explore different approaches and provide you with alternative methods to suit your specific needs.
Table of Contents
Methods to Remove the Product Description Tab
There are several ways to remove the product description tab in WooCommerce. Here, we will outline three commonly used methods:
Method 1: Using a Plugin
Using a plugin is one of the simplest methods to remove the product description tab. Follow these steps:
- Install and activate the “Remove Product Tabs for WooCommerce” plugin from the WordPress plugin repository.
- Navigate to your WooCommerce settings and locate the “Remove Product Tabs” option.
- Enable the option to remove the product description tab.
- Save your changes, and the product description tab will no longer appear on your WooCommerce product pages.
Method 2: Modifying the Theme Files
Modifying the theme files directly is another approach to remove the product description tab. Follow these steps:
- Locate the WooCommerce template files in your theme directory.
- Find the file responsible for displaying the product description tab, often named “product-template.php”.
- Remove or comment out the relevant code that generates the product description tab.
- Save the changes, and the product description tab will be hidden on your WooCommerce product pages.
Method 3: Using a Custom functions.php Code
For users comfortable with editing code, this method provides a more hands-on approach. Follow these steps:
- Open your theme’s “functions.php” file.
- Add the following code snippet to the file:
// Remove product description tab
function remove_product_description_tab( $tabs ) {
unset( $tabs['description'] );
return $tabs;
}
add_filter( 'woocommerce_product_tabs', 'remove_product_description_tab', 99 );
------------
// Remove product Additional information & Review tab
function remove_product_description_tab( $tabs ) {
unset( $tabs['description'] ); // Remove the description tab
unset( $tabs['reviews'] ); // Remove the reviews tab
unset( $tabs['additional_information'] ); // Remove the additional information tab
return $tabs;
}
add_filter( 'woocommerce_product_tabs', 'remove_product_description_tab', 99 );
/*Note: Add unset line for which tab you want to remove*/
- Save the changes, and the product description tab will be removed from your WooCommerce product pages.
Other Possible Ways
Apart from the methods mentioned above, there are alternative approaches to remove the product description tab in WooCommerce:
Custom CSS:
You can hide the product description tab using CSS code. Target the specific element using the appropriate selector and set its display property to “none”. Here’s an example of CSS code:
/* Hide product description tab */
.single-product .woocommerce-tabs .panel.entry-content {
display: none;
}
WooCommerce Hooks:
WooCommerce provides various hooks that allow you to modify the product page layout. By utilizing hooks such as “woocommerce_product_tabs” or “woocommerce_after_single_product_summary”, you can customize the product page and remove the description tab. Here’s an example of using hooks:
// Remove all product tab using hooks
function remove_product_description_tab() {
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 );
}
add_action( 'woocommerce_before_single_product_summary', 'remove_product_description_tab', 5 );
-------
//Another way to remove all products tabs in product page
add_filter( 'woocommerce_product_tabs', '__return_empty_array', 9999 );
Conclusion
Removing the product description tab in WooCommerce is a straightforward process that can be achieved through various methods. Whether you prefer using a plugin, modifying theme files, or implementing custom code, the choice depends on your technical expertise and specific requirements. By following the step-by-step instructions and utilizing the provided code snippets outlined in this article, you can easily remove the product description tab and enhance the appearance and functionality of your WooCommerce product pages. Experiment with different approaches and find the method that best suits your needs.
I hope this article helped you to learn how to remove the description tabs in woocommerce. If you have any doubts or problem with the code, comment below to find the solutions. Also share this blog if you find this useful.
Want to build professional website for your Business or Store, Get a free quote here
Click here to get Premium Plugins and Themes at rs.249. Get 20% Off on your first order “WELCOME20”