Title: Hide Categories On Shop Page
Author: WMEric
Published: <strong>9. Mai 2018</strong>
Last modified: 28. November 2022

---

Search plugins

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://s.w.org/plugins/geopattern-icon/hide-categories-on-shop-page.svg)

# Hide Categories On Shop Page

 By [WMEric](https://profiles.wordpress.org/wmeric/)

[Download](https://downloads.wordpress.org/plugin/hide-categories-on-shop-page.1.1.3.zip)

 * [Details](https://de-ch.wordpress.org/plugins/hide-categories-on-shop-page/#description)
 * [Reviews](https://de-ch.wordpress.org/plugins/hide-categories-on-shop-page/#reviews)
 *  [Installation](https://de-ch.wordpress.org/plugins/hide-categories-on-shop-page/#installation)
 * [Development](https://de-ch.wordpress.org/plugins/hide-categories-on-shop-page/#developers)

 [Support](https://wordpress.org/support/plugin/hide-categories-on-shop-page/)

## Description

This free WooCommerce extension permits you to hide categories on your shops main
page.
 For this you have to save the categories with ‚,‘ seperated in woocommerce
> settings > products tab section.

In order for this to work you have to have Categories displayed. This can be set
via Customizer. Appearance > Customize > WooCommerce > Product Catalog.

«Choose what to display on the main shop page.» Select Show categories as seen in
the Screenshot below.

### Additional Information

For users who has a different/custom page for their shop you can edit the wc-hide-
categories.php file
 Find line # 127 and remove //

    ```
    //$mwd_opt4 = in_array( 'product_cat', $taxonomies ) && ! is_admin() && is_page('YOUR_PAGE_SLUG'),
    ```

Then find line #129 `/*|| $mwd_opt4*/`

Change to
 || $mwd_opt4

To remove products from those categories find line 160

    ```
    // Uncomment the function below if you also want those products hidden
    /*
        add_action( 'woocommerce_product_query', 'mwd_hwcosp_remove_product_in_cat' );

        function mwd_hwcosp_remove_product_in_cat( $q ) {
            //hwcosp_global is the databse row entry
            $opt_terms = get_option('hwcosp_global');

            // Processes our users data to the way we want it from above
            $data = mwd_hwcosp_comma_separated_to_array($opt_terms);

            $tax_query = (array) $q->get('tax_query');
            $tax_query[] = array(
                                 'taxonomy' => 'product_cat',
                                 'field' => 'slug',
                                 'terms' => $data, // Set Category Slug which products not show on the shop and Archieve page.
                                 'operator' => 'NOT IN'
                                );
            $q->set( 'tax_query', $tax_query );
        }
    */
    ```

The code is well documented so its easy to find what part you are looking for

If you have any question please ask in the support forum, Thanks

## Installation

 * Upload ‚wc-hide-categories.zip‘ like any other plugin or upload the zip file 
   contents to the ‚/wp-content/plugins/‘ directory
 * Activate the plugin through the ‚Plugins‘ menu in WordPress
 * Configure the plugin at Dashboard > WooCommerce > Settings > Products > Hide 
   Categories On Shop Page
 * Save your settings with the category slugs with ‚,‘ seperated.
 * I.E. cat1, cat2, cat3

## FAQ

### Does this work on Multisite?

As of version 1.1.0 Yes

### I’d like to donate, how can I?

Click the donate button to the right or go here https://www.paypal.me/matrixwd
 
And thank you in advance 🙂

## Reviews

![](https://secure.gravatar.com/avatar/d62346787679c92caaa7ebadae09298dc728876eb77884e4b6c741785d6e11d3?
s=60&d=retro&r=g)

### 󠀁[Works really fine with WooCommerce](https://wordpress.org/support/topic/works-really-fine-with-woocommerce-2/)󠁿

 [wasim6568](https://profiles.wordpress.org/wasim6568/) 3. September 2022

I can see there are 2 people they told the plugin isn't working. But they are wrong.
It's working properly. If you want to work with this plugin then you have to go 
to woocommerce >> setting >> product >> Hide Categories On Shop Page and then in
this box first type eg : (prnt.sc/Y-vk69VlUXkD) then copy your category slug and
pest in the box. Save changes and clear your site cache. And your age good to go.
A very good plugin for removing categories on a single product page. Hope the above
instruction will help new users. Thanks

![](https://secure.gravatar.com/avatar/9cc9feabaac163180a40eba6ee2abfcc3466365cbd4580fb5e27fa14dc58dfb9?
s=60&d=retro&r=g)

### 󠀁[Plugin Hide Categories On Shop Page](https://wordpress.org/support/topic/plugin-hide-categories-on-shop-page/)󠁿

 [balans](https://profiles.wordpress.org/balans/) 8. September 2021

Works fine with WooCommerce 5.6.0 on WordPress 5.8

![](https://secure.gravatar.com/avatar/b610527c032a51f3b0732c3a5cfc7e4898a5a8fa84bf3b67067e74a0524eafb6?
s=60&d=retro&r=g)

### 󠀁[This doesn’t work](https://wordpress.org/support/topic/this-doesnt-work-9/)󠁿

 [thehowarde](https://profiles.wordpress.org/thehowarde/) 3. Mai 2021 3 replies

Not only doesn't this plugin work right. It throws PHP warnings and fills the error
log. At this point, this plugin hasn't been updated in over a year.

![](https://secure.gravatar.com/avatar/328f04dd33c74981c772d634789c4db28b736ea86f9e7ed33c9a37d73ad8dace?
s=60&d=retro&r=g)

### 󠀁[Works really fine with WooCommerce](https://wordpress.org/support/topic/works-really-fine-with-woocommerce/)󠁿

 [hexaae](https://profiles.wordpress.org/hexaae/) 6. Dezember 2020

It was able to hide unwanted categories from all widgets of a WooCommerce site, 
where even 3rd party code snippets failed. Very good.

![](https://secure.gravatar.com/avatar/dbbeac5def611be9c297fb905c0ea48c4d4c768ab30953e8f2badbb67d535e83?
s=60&d=retro&r=g)

### 󠀁[Not working.](https://wordpress.org/support/topic/not-working-3334/)󠁿

 [Vasif](https://profiles.wordpress.org/vasif/) 25. Juli 2020

It does not hide uncategorized category.

![](https://secure.gravatar.com/avatar/1bca4adeff1a9a804506c40f197c0f7545234540ba92d699c0ec2c72ec4b19b3?
s=60&d=retro&r=g)

### 󠀁[Works perfectly (hides a product category)](https://wordpress.org/support/topic/works-perfectly-hides-a-product-category/)󠁿

 [olppa](https://profiles.wordpress.org/olppa/) 20. März 2020

Exactly what I was looking for. Hides a seasonal category (christmas) from the shop
page. Thank you for developing this.

 [ Read all 13 reviews ](https://wordpress.org/support/plugin/hide-categories-on-shop-page/reviews/)

## Contributors & Developers

“Hide Categories On Shop Page” is open source software. The following people have
contributed to this plugin.

Contributors

 *   [ WMEric ](https://profiles.wordpress.org/wmeric/)

[Translate “Hide Categories On Shop Page” into your language.](https://translate.wordpress.org/projects/wp-plugins/hide-categories-on-shop-page)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/hide-categories-on-shop-page/),
check out the [SVN repository](https://plugins.svn.wordpress.org/hide-categories-on-shop-page/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/hide-categories-on-shop-page/)
by [RSS](https://plugins.trac.wordpress.org/log/hide-categories-on-shop-page/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.1.3

 * Added missing line if foreach loop and fixed versioning numbers

#### 1.1.2

 * Updated Foreach() that was causing a PHP warning: Attempt to read property «slug»
   on int … line 147

#### 1.1.1

 * Updated Readme

#### 1.1.0

 * Updated so that it now works on WordPress Multisites
 * Added new comments to the code so its easier to follow on what block does what
 * Added the ability to hide sub categories
 * Added the ability to hide all products under root category and sub category

#### 1.0.1

 * Added the conditionals to test if the shop is_home() or is_front_page() and added
   the a fourth test a user could uncomment to add their custom shop page slug.

#### 1.0

 * Stable initial release

## Meta

 *  Version **1.1.3**
 *  Last updated **4 Jahren ago**
 *  Active installations **1'000+**
 *  WordPress version ** 3.0.1 or higher **
 *  Tested up to **6.1.15**
 *  PHP version ** 7.0 or higher **
 *  Language
 * [English (US)](https://wordpress.org/plugins/hide-categories-on-shop-page/)
 * Tags
 * [e-commerce](https://de-ch.wordpress.org/plugins/tags/e-commerce/)[woocommerce](https://de-ch.wordpress.org/plugins/tags/woocommerce/)
   [WordPress](https://de-ch.wordpress.org/plugins/tags/wordpress/)
 *  [Advanced View](https://de-ch.wordpress.org/plugins/hide-categories-on-shop-page/advanced/)

## Ratings

 4.4 von 5 Sternen.

 *  [  11 5-Sterne-Rezensionen     ](https://wordpress.org/support/plugin/hide-categories-on-shop-page/reviews/?filter=5)
 *  [  1 4-Sterne-Rezension     ](https://wordpress.org/support/plugin/hide-categories-on-shop-page/reviews/?filter=4)
 *  [  0 3-Sterne-Rezensionen     ](https://wordpress.org/support/plugin/hide-categories-on-shop-page/reviews/?filter=3)
 *  [  0 2-Sterne-Rezensionen     ](https://wordpress.org/support/plugin/hide-categories-on-shop-page/reviews/?filter=2)
 *  [  2 1-Sterne-Rezensionen     ](https://wordpress.org/support/plugin/hide-categories-on-shop-page/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/hide-categories-on-shop-page/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/hide-categories-on-shop-page/reviews/)

## Contributors

 *   [ WMEric ](https://profiles.wordpress.org/wmeric/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/hide-categories-on-shop-page/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](https://www.paypal.me/matrixwd)