# How to Display Only Categories in WooCommerce: A Beginner’s Guide
Want to showcase your WooCommerce product categories without the clutter of individual products? This guide shows you how to display only categories on your WooCommerce shop pages, giving your store a cleaner, more organized look. We’ll cover methods for beginners, with clear explanations and real-life examples.
Why Display Only Categories?
Sometimes, displaying all your products at once can be overwhelming for customers. Imagine a large online bookstore—showing every single book on the homepage would be chaotic! Instead, presenting categories like “Fiction,” “Mystery,” and “Science Fiction” allows shoppers to easily browse and find what they’re looking for. This improved navigation boosts user experience and potentially increases sales.
Methods to Show Only WooCommerce Categories
There are several ways to achieve this, ranging from simple theme customizations to using plugins. We’ll explore the most effective and straightforward methods.
1. Using a WooCommerce Category Template (Recommended for Beginners)
This is the easiest and most recommended method for those new to WooCommerce development. Many themes already offer a template specifically designed for category archives. You can achieve this without any code modifications, just a little theme navigation.
How it Works:
WooCommerce uses templates to structure your shop pages. The category archive template controls how individual product categories are displayed. By utilizing this template correctly, you can ensure only the category information (name, description, and possibly images) is shown, without displaying individual products within the category.
Real-life Example: Imagine an online clothing store. Instead of showing all 100 t-shirts on the “T-shirts” category page, you’ll only see the “T-shirts” category heading, a description (e.g., “Find your perfect tee!”), and maybe an image representing the category.
Steps:
- Check your theme: Most modern WooCommerce themes have a `category.php` file within their template directory. If your theme does *not* have a `category.php` file it will use the `archive.php` or `index.php` files.
- Modify (or create) `category.php`: While this step can be done directly in the theme files (less recommended for updates), it’s safer to create a child theme to make future theme updates easier. Inside `category.php` remove or comment out the WooCommerce loop (typically a `while` loop that fetches and displays products). This loop is usually found within this structure:
By removing or commenting (adding `//` before each line) this code, you effectively prevent individual products from appearing on category pages. You can leave the category title, description, and other category-specific information.
2. Using a Plugin (Simplest for Non-Coders)
If you’re not comfortable editing code, a plugin can simplify the process. Several plugins are designed to manage WooCommerce category displays.
How it works: These plugins Learn more about How To Make Woocommerce Products Page Change Template often provide settings within your WordPress admin area to customize the appearance of category pages, offering options to show or hide products. Look for plugins specifically designed for WooCommerce category management or customization.
Real-life example: A plugin might offer a checkbox to toggle “Display Products on Category Pages,” allowing you to simply uncheck it to achieve the desired effect.
Finding a Suitable Plugin:
- Search the WordPress Plugin Directory for “WooCommerce Category Display” or similar keywords.
- Read reviews and compare features before installing a plugin.
3. Customizing the `woocommerce_archive_description` Function (Advanced)
This approach involves using a custom function to modify the category archive description within your theme’s `functions.php` file (again, consider using a child theme). It is more suitable for users comfortable working with PHP.
How it Works: You use the `woocommerce_archive_description` filter to remove or customize the content displayed on the category pages, allowing you to show only the category description.
function my_custom_category_description( $description ) { //Only show the category description return $description; //Or modify the description here. } add_filter( 'woocommerce_archive_description', 'my_custom_category_description' );
Remember: Always back up your website before making any code changes. If you’re uncertain about modifying code, the plugin method is the safest option.
Conclusion
Displaying only categories in WooCommerce greatly enhances the user experience by providing a clean and organized shopping interface. The method you choose depends on your technical skills and comfort level. Remember to prioritize a user-friendly experience – a well-organized store will likely lead to higher conversions!