{"id":9520,"date":"2022-07-19T14:14:19","date_gmt":"2022-07-19T14:14:19","guid":{"rendered":"https:\/\/ecommerce.folio3.com\/blog\/?p=9520"},"modified":"2025-09-03T13:28:15","modified_gmt":"2025-09-03T13:28:15","slug":"how-to-hide-a-category-in-woocommerce","status":"publish","type":"post","link":"https:\/\/ecommerce.folio3.com\/blog\/how-to-hide-a-category-in-woocommerce\/","title":{"rendered":"How To Hide a Category In WooCommerce From The Shop Page"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">You may learn <\/span><b>how to hide a category in WooCommerce <\/b><span style=\"font-weight: 400;\">from your shop page by consulting the guidelines we at Folio3 have provided below.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The shop page is the most crucial page for an eCommerce website because it is where the majority of transactions take place and where customers may view the items for sale.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><a href=\"https:\/\/ecommerce.folio3.com\/woocommerce-development-company\/\" target=\"_blank\" rel=\"noopener\">WooCommerce development company<\/a><span style=\"font-weight: 400;\"> shop page must be perfect in every way, from presentation to functionality. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">For some people, it&#8217;s acceptable but not for others that all the products from every category are displayed by default.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">You could wish to limit the categories that are displayed on your <\/span><a href=\"https:\/\/ecommerce.folio3.com\/woocommerce-integration\/\" target=\"_blank\" rel=\"noopener\">WooCommerce integration<\/a><span style=\"font-weight: 400;\"> shop page, but you don&#8217;t know how.<\/span><\/p>\n<h2>Simple Steps on How to Hide a Category in WooCommerce<\/h2>\n<p><span style=\"font-weight: 400;\">On <\/span><b>how to hide a category in WooCommerce<\/b><span style=\"font-weight: 400;\">, we will be addressing two simple ways;<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Hiding the category using the \u201cwoocommerce_product_query_tax_query\u201d filter<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Hiding the category using the get_terms filter<\/span><\/li>\n<\/ol>\n<ul>\n<li aria-level=\"1\">\n<h3>The \u201cwoocommerce_product_query_tax_query\u201d Filter<\/h3>\n<\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">The first method is to conceal uncategorized products from the shop page using the WooCommerce product query action. The functions.php file must contain this. Add the following code:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">function exclude_uncategorized_from_category_list($terms, $taxonomies, $args) { foreach ($terms as $key =&gt; $term) { if ($term-&gt;slug === &#8216;uncategorized&#8217;) { unset($terms[$key]); break; } } return $terms; } add_filter(&#8216;get_terms&#8217;, &#8216;exclude_uncategorized_from_category_list&#8217;, 10, 3);<\/span><\/p>\n<p><span style=\"font-weight: 400;\">This code will hide the items under the \u201cUncategorized\u201d and \u201cfurniture\u201d categories.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">This method removes the &#8220;Uncategorized&#8221; category from product category lists<\/span><\/p>\n<ul>\n<li aria-level=\"1\">\n<h3>The get_terms Filter<\/h3>\n<\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">In order to prevent the generic &#8220;uncategorized&#8221; category from appearing and rendering the site more confusing and unattractive, you will choose to hide some of the categories from view on your store page.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">It could simply be removed from the shop page, or the category name could be changed to something more appropriate. It can be hidden using this approach.<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Create a category slug first, go to the WordPress dashboard and click on Products &gt; Categories.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">&#8220;Uncategorized&#8221; will serves as the category&#8217;s slug.<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Enter the following code into <a href=\"https:\/\/www.w3schools.com\/php\/php_functions.asp#:~:text=PHP%20User%20Defined%20Functions&amp;text=A%20function%20is%20a%20block,a%20call%20to%20the%20function.\" target=\"_blank\" rel=\"nofollow noopener\">functions.php<\/a> to make the uncategorized slug invisible for your child theme.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">The get terms feature is now part of the category. There shouldn&#8217;t be any more indication of the &#8220;Uncategorized&#8221; category.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">You can next input the slug names for every category you want to hide:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">add_filter( &#8216;get_terms&#8217;, &#8216;ts_get_subcategory_terms&#8217;, 10, 3 );<\/span><\/p>\n<p><span style=\"font-weight: 400;\">function ts_get_subcategory_terms( $terms, $taxonomies, $args ) {<\/span><\/p>\n<p><span style=\"font-weight: 400;\">$new_terms = array();<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\/\/ if it is a product category and on the shop page<\/span><\/p>\n<p><span style=\"font-weight: 400;\">if ( in_array( &#8216;product_cat&#8217;, $taxonomies ) &amp;&amp; ! is_admin() &amp;&amp;is_shop() ) {<\/span><\/p>\n<p><span style=\"font-weight: 400;\">foreach( $terms as $key =&gt; $term ) {<\/span><\/p>\n<p><span style=\"font-weight: 400;\">if ( !in_array( $term-&gt;slug, array( &#8216;uncategorised&#8217;,&#8217;furniture&#8217; ) ) ) { \/\/pass the slug name here<\/span><\/p>\n<p><span style=\"font-weight: 400;\">$new_terms[] = $term;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">}}<\/span><\/p>\n<p><span style=\"font-weight: 400;\">$terms = $new_terms;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">}<\/span><\/p>\n<p><span style=\"font-weight: 400;\">return $terms;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">}<\/span><\/p>\n<p><span style=\"font-weight: 400;\">This code will hide the items under the &#8220;Uncategorized&#8221; and &#8220;furniture&#8221; categories.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Using either of these two methods to answer your question \u2013 <\/span><b>how to hide a category in WooCommerce,<\/b><span style=\"font-weight: 400;\"> you can hide from the shop page with either of them.<\/span><\/p>\n<h2>Reasons For Why You Want To Know How To Hide A Category In WooCommerce Store<b><br \/>\n<\/b><\/h2>\n<p style=\"text-align: center;\"><iframe title=\"Hide WooCommerce Product Categories on Shop Page or other Page - Anthony Tutorials\" src=\"https:\/\/www.youtube.com\/embed\/xNceE3Ucnh8\" width=\"683\" height=\"384\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p><span style=\"font-weight: 400;\">There can be a thousand reasons why a merchant becomes eager to learn <\/span><b>how to hide a category in WooCommerce<\/b><span style=\"font-weight: 400;\">.<\/span><\/p>\n<h3>Reason #1 \u2013 Customers\u2019 Encouragement<\/h3>\n<p><span style=\"font-weight: 400;\">You have the option to allow certain user roles to purchase products while keeping them hidden from the general public. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">In this approach, you can give particular user groups, like members, a feeling of exclusivity.<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> Therefore, existing consumers will need to sign up for membership before they can purchase the hidden goods.<\/span><\/p>\n<h3>Reason #2 \u2013 Members And Employees With Special Pricing<\/h3>\n<p><span style=\"font-weight: 400;\">If you manage a membership website, you already understand the benefits of providing discounted rates for expanding your clientele and increasing sales. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">By using differential pricing on your eCommerce site, you may offer your site&#8217;s members a better deal, which entices non-members to become subscribers.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Similar to in-store promotions, several online retailers provide staff members with the opportunity to save money on purchases.<\/span><\/p>\n<h3>Reason #3 \u2013 Sell Merchandise To Retail And Wholesale Stores<\/h3>\n<p><span style=\"font-weight: 400;\">The products and prices offered for each type of consumer must be clearly differentiated if you sell to both retail and wholesale customers on the same e-commerce website development. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">You can achieve this by shielding retail customers from wholesale-only <a href=\"https:\/\/ecommerce.folio3.com\/blog\/how-to-add-product-image-in-woocommerce-programmatically\/\" target=\"_blank\" rel=\"noopener\">product<\/a> categories. Retail customers won&#8217;t be able to see products that are exclusively offered at bulk discounts in this fashion.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The article would be a kind of tutorial on <\/span><b>how to hide a category in WooCommerce<\/b><span style=\"font-weight: 400;\"> store individually if you want to limit access to only a small number of your products.<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><b><a href=\"https:\/\/ecommerce.folio3.com\/hire-woocommerce-developers\/\"><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/ecommerce.folio3.com\/blog\/wp-content\/uploads\/2022\/06\/woocommerce-conversion-cta.png\" alt=\"\" width=\"998\" height=\"292\" \/><\/a><\/b><\/span><\/p>\n<h2>Two Ways To Allow Users to See Protected Categories<\/h2>\n<p><span style=\"font-weight: 400;\">You can allow users to see protected categories in the following two ways;<\/span><\/p>\n<ul>\n<li aria-level=\"1\">\n<h3>Via Members Only<\/h3>\n<\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Members Only is the quickest plugin to configure.\u00a0<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Install and activate the <a href=\"https:\/\/wordpress.org\/plugins\/members\/\" target=\"_blank\" rel=\"nofollow noopener\">Members<\/a> plugin.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Go to WooCommerce &gt; Settings &gt; Members Only and view the settings.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">For international Members Only settings;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Simply change the &#8216;Restricted Content&#8217; column to &#8216;Specified Categories&#8217; if you want to create protected categories.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">You can put your limited categories in the &#8220;Restricted Categories&#8221; area at this time if you really want to filter all categories in the very same manner.<\/span><\/p>\n<ul>\n<li aria-level=\"1\">\n<h3>Via Password Or User Role<\/h3>\n<\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">We also need to alter the &#8220;Restriction Method&#8221; box to either &#8220;Password&#8221; or &#8220;User Role&#8221; because we want to create different restriction rules for various categories. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">Access can also be restricted based on a user&#8217;s logged-in status.<\/span><\/p>\n<p style=\"padding-top: 1em!important; padding-bottom: 1em!important; width: 100%; display: block; font-weight: bold; background-color: #ecf0f1; border: 0!important; border-left: 4px solid #8E44AD!important;\">To\u00a0<a href=\"https:\/\/ecommerce.folio3.com\/blog\/speed-up-woocommerce-checkout\/\"><b>speed up WooCommerce checkout<\/b><\/a>\u00a0process for the WooCommerce store, use the recommendations in this article.<\/p>\n<h2>Plugins That Can Help Hide the Categories On Your WooCommerce Store<\/h2>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/ecommerce.folio3.com\/blog\/wp-content\/uploads\/2022\/07\/essential-wordpress-plugins-featured-750x498-1.jpeg\" alt=\"WooCommerce Plugins\" width=\"750\" height=\"498\" \/><\/p>\n<p><span style=\"font-weight: 400;\">There are 3 plugins which are considered the best in the quest of <\/span><b>how to hide a category in WooCommerce<\/b><span style=\"font-weight: 400;\"> on the Shop Page<\/span><\/p>\n<ol>\n<li>\n<h3>WooCommerce Products Visibility<\/h3>\n<\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">The <a href=\"https:\/\/wordpress.org\/plugins\/wc-products-visibility\/\" target=\"_blank\" rel=\"nofollow noopener\">WooCommerce Products Visibility<\/a> is also an amazing plugin to learn about when you are learning <a href=\"https:\/\/ecommerce.folio3.com\/blog\/how-many-products-can-woocommerce-handle\/\" target=\"_blank\" rel=\"noopener\">products WooCommerce Can handle<\/a>.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">you can specify which products are displayed throughout the entire site for each user role.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Keep in mind that the ONLY plugin that enables you to set combination visibility rules is WooCommerce Products Visibility. In other words, you can simultaneously hide products, categories, and tags for a given function.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">As long as it uses standard WordPress filters, it&#8217;s also the only plugin that conceals the specified goods, categories, and tags throughout your entire site, encompassing menus, widgets, and even the theme.<\/span><\/p>\n<ol start=\"2\">\n<li>\n<h3>WooCommerce Protected Categories<\/h3>\n<\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">This WooCommerce Protected Categories plugin is distinctive in that it was created especially for websites that serve solitary customers. You can password-protect and conceal a category on your website. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">Give your customer the password after which they can navigate a catalog\u00a0of goods that have already been specially chosen for them. Additionally, you have the option to restrict protected categories to &#8220;user roles&#8221; rather than specific people.<\/span><\/p>\n<ol start=\"3\">\n<li>\n<h3>Hide Categories Or Products On Shop Page<\/h3>\n<\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">The Hide Categories Or Products On Shop Page is a WooCommerce addon that allows users to conceal categories or products on the Shop Page. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">It is possible to hide categories and goods in WooCommerce from the shop page. This WooCommerce-compatible\u00a0plugin is free.<\/span><\/p>\n<h2>Final Words<\/h2>\n<p><span style=\"font-weight: 400;\">Making your shop page simpler to use and manage requires the <\/span>WooCommerce <a href=\"https:\/\/ecommerce.folio3.com\/woocommerce-design-company\/\" target=\"_blank\" rel=\"noopener\">WooCommerce design<\/a><span style=\"font-weight: 400;\"> shop page hiding category function.<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> It makes it simple for you to arrange your products and classify them into the relevant groups. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">Customers love it because they can pick and choose the items they want, which raises customer satisfaction and raises traffic, sales, and conversion rates.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">This guide on <\/span><b>how to hide a category in WooCommerce<\/b><span style=\"font-weight: 400;\"> on the shop page is essential. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">If you need assistance in other eCommerce solutions like <\/span><a href=\"https:\/\/ecommerce.folio3.com\/woocommerce-migration\/\" target=\"_blank\" rel=\"noopener\">WooCommerce migration<\/a><span style=\"font-weight: 400;\">, <\/span>BigCommerce web design company<span style=\"font-weight: 400;\">,<\/span> Salesforce Commerce Cloud Development<span style=\"font-weight: 400;\">, or <\/span>Salesforce Commerce Cloud<span style=\"font-weight: 400;\"> we would be glad to help you out!<\/span><\/p>\n<h2><b>FAQs<\/b><\/h2>\n<p><b>1- How do I hide specific category on shop page?<\/b><\/p>\n<p><span style=\"font-weight: 400;\">If you want to create protected categories, change the &#8220;Restricted Content&#8221; column to &#8220;Specified Categories.&#8221; <\/span><\/p>\n<p><span style=\"font-weight: 400;\">If you absolutely want to filter all categories, in the same way, you can now enter your restricted categories in the &#8220;Restricted Categories&#8221; field.<\/span><\/p>\n<p><b>2- How do I hide categories from being displayed on shop page <\/b><b>WooCommerce B2B<\/b><b>?<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Go to WooCommerce &gt; Settings &gt; Products. Go to the subsection \u201cHide from categories\u201d.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">And that\u2019s about it, you are done.\u00a0<\/span><\/p>\n<p><b>3- How do I hide a category from a single product page in WooCommerce?<\/b><\/p>\n<p><span style=\"font-weight: 400;\">You can with WooCommerce conceal a category from a single product page by using a plugin.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">First, install and turn on the plugin. The plugin must first be downloaded from barn2.com.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Setting up the plugin, step two. Navigate to WooCommerce &gt; Settings in the following step.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Choose which categories to conceal in step three.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Edit category visibility in step four.<\/span><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>You may learn how to hide a category in WooCommerce from your shop page by consulting the guidelines we at Folio3 have provided below. The shop page is the most crucial page for an eCommerce website because it is where the majority of transactions take place and where customers may view the items for sale.<\/p>\n","protected":false},"author":1,"featured_media":9521,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[30],"tags":[],"class_list":{"0":"post-9520","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-woocommerce"},"acf":[],"featured_image_data":{"src":"https:\/\/ecommerce.folio3.com\/blog\/wp-content\/uploads\/2022\/07\/how-to-hide-a-category-in-woocommerce-1.png","alt":"how-to-hide-a-category-in-woocommerce","caption":""},"_links":{"self":[{"href":"https:\/\/ecommerce.folio3.com\/blog\/wp-json\/wp\/v2\/posts\/9520"}],"collection":[{"href":"https:\/\/ecommerce.folio3.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ecommerce.folio3.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ecommerce.folio3.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ecommerce.folio3.com\/blog\/wp-json\/wp\/v2\/comments?post=9520"}],"version-history":[{"count":0,"href":"https:\/\/ecommerce.folio3.com\/blog\/wp-json\/wp\/v2\/posts\/9520\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ecommerce.folio3.com\/blog\/wp-json\/wp\/v2\/media\/9521"}],"wp:attachment":[{"href":"https:\/\/ecommerce.folio3.com\/blog\/wp-json\/wp\/v2\/media?parent=9520"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ecommerce.folio3.com\/blog\/wp-json\/wp\/v2\/categories?post=9520"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ecommerce.folio3.com\/blog\/wp-json\/wp\/v2\/tags?post=9520"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}