Displaying product categories on WooCommerce product pages can be helpful for navigation, but there may be times when you want a cleaner look by hiding these categories. Whether it’s for design or branding purposes, hiding the category can help simplify the product page layout and focus customers’ attention on the product details.
In this guide, we’ll show you how to hide the category display on WooCommerce product pages without using a plugin.
Step 1: Use CSS to Hide Product Category on the Product Page
One of the simplest ways to hide the category is by using CSS. This method is easy to implement and won’t affect any other category displays in your shop, such as those on category pages or menus.
CSS Code to Hide Category Display
Add the following CSS to your theme’s style.css file or to the Additional CSS section in the WordPress Customiser:
/* Hide product category on single product page */
.single-product .product_meta .posted_in {
display: none;
}
Explanation:
- CSS Targeting: This CSS specifically targets the category line (
.posted_in) on single product pages only. - Selective Hiding: The CSS will not hide categories in other areas, such as the shop or category archive pages, only on individual product pages.
Step 2: Use PHP to Remove the Category Programmatically (Optional)
If you want more control or if your theme does not use the default WooCommerce CSS classes, you can remove the category display using PHP. This method is also helpful if you plan to make other adjustments to product page metadata.
PHP Code to Remove Category from Product Pages
Add this code to your theme’s functions.php file or a child theme:
/*
* Snippet: How to Hide Product Category on WooCommerce Product Pages – 2026
* Author: John Cook
* URL: https://wcsuccessacademy.com/?p=1703
* Tested with WooCommerce 10.7.0
* "This function removes the category display from the product page"
*/
function wcsuccess_remove_product_category() {
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 );
}
add_action( 'wp', 'wcsuccess_remove_product_category' );
xplanation:
- Remove Action: This code removes the entire metadata section (
woocommerce_template_single_meta), which includes the category display from the product page. - Action Hook: The
wphook ensures this function only runs on the front end, avoiding any issues with WooCommerce in the admin area.
Step 3: Optional Customisation – Hiding Other Metadata
If your product page includes additional metadata, such as tags or SKU, you may want to selectively hide these as well. You can modify the CSS to hide only specific elements by targeting their classes.
CSS to Hide Additional Metadata
Here are some additional CSS rules you can add if you wish to hide tags or SKUs:
/* Hide product tags */
.single-product .product_meta .tagged_as {
display: none;
}
/* Hide product SKU */
.single-product .product_meta .sku_wrapper {
display: none;
}
Explanation:
- Selective Metadata Hiding: These CSS rules allow you to hide specific elements like tags and SKU while leaving other metadata visible.
- Customisable: Adjust these CSS rules as needed to control which metadata elements are shown or hidden on product pages.
Example Workflow
- CSS Customisation: Add CSS to hide the category display on individual product pages.
- PHP Adjustment (Optional): Use PHP to remove category and metadata for a cleaner product page.
- Additional Metadata Control: Optionally hide other metadata such as tags or SKU with additional CSS rules.
Conclusion
Hiding the product category on WooCommerce product pages can create a simpler, more focused product page layout. By using either CSS or PHP, you can customise your WooCommerce product pages to better fit your design goals.
As always, test these changes in a staging environment before deploying to your live site. For more customisation options, explore our WooCommerce Visual Hooks Guide or our wp-config generator for advanced configurations.
I have been working with WordPress and WooCommerce since 2012 and have developed a deep knowledge of the content management system. Since 2012, I have developed several plugins and designed dozens of websites utilising different frameworks, CMS’s and programming languages. I am proficient in PHP, Python, Java, C, C++, R and JavaScript with limited experience in Go, Kotlin and Swift.
Educationally, I have a Master’s degree in cyber security a Bachelor’s (Hons, First Class) in Applied Research and a Graduate Certificate in Data Science. I’m currently undertaking PhD studies investigating IoT cybersecurity. I recently graduated with First Class Honours and Masters of Information Technology, receiving the Executive Dean’s Award for studies undertaken in the 2021 and 2022 academic years. I have worked in the information technology industry for the past 11 years primarily as a software/web developer specific to design, optimisation, network management and security. My research interests are in the areas of Internet of Things (IoT), 5G and Beyond Networks, information security for wireless networks and software development.
Stay In Touch

