{"id":85402,"date":"2018-05-09T01:37:20","date_gmt":"2018-05-09T01:37:20","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/hide-categories-on-shop-page\/"},"modified":"2022-11-28T01:42:18","modified_gmt":"2022-11-28T01:42:18","slug":"hide-categories-on-shop-page","status":"publish","type":"plugin","link":"https:\/\/ceb.wordpress.org\/plugins\/hide-categories-on-shop-page\/","author":13047768,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.1.3","stable_tag":"1.1.3","tested":"6.1.10","requires":"3.0.1","requires_php":"7.0","requires_plugins":"","header_name":"Hide WooCommerce Categories On Shop Page","header_author":"Matix Web Designers","header_description":"Simple solution to hide specific categories in you woocommerce shop main page i.e. domain.com\/shop","assets_banners_color":"","last_updated":"2022-11-28 01:42:18","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/www.paypal.me\/matrixwd","header_plugin_uri":"https:\/\/www.matrixwebdesigners.com\/plugins\/woocommerce-hide-categories-shop-page\/","header_author_uri":"https:\/\/www.matrixwebdesigners.com\/","rating":4.3,"author_block_rating":0,"active_installs":1000,"downloads":43191,"num_ratings":14,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0":{"tag":"1.0","author":"WMEric","date":"2018-05-09 01:39:14"},"1.0.1":{"tag":"1.0.1","author":"WMEric","date":"2018-05-09 03:27:20"},"1.1.0":{"tag":"1.1.0","author":"WMEric","date":"2020-02-16 06:55:10"},"1.1.1":{"tag":"1.1.1","author":"WMEric","date":"2021-12-08 13:49:24"},"1.1.2":{"tag":"1.1.2","author":"WMEric","date":"2022-11-23 17:55:08"},"1.1.3":{"tag":"1.1.3","author":"WMEric","date":"2022-11-28 01:42:18"}},"upgrade_notice":{"1.0.1":"<p>Users should use this version and disregard version 1.0<\/p>"},"ratings":{"1":2,"2":0,"3":0,"4":1,"5":10},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.0.1","1.1.0","1.1.1","1.1.2","1.1.3"],"block_files":[],"assets_screenshots":[],"screenshots":{"1":"New \"Hide Categories on Shop Page\" link under Product tab","2":"Before Plugin","3":"After Plugin"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[888,286,129180],"plugin_category":[],"plugin_contributors":[156554],"plugin_business_model":[],"class_list":["post-85402","plugin","type-plugin","status-publish","hentry","plugin_tags-e-commerce","plugin_tags-woocommerce","plugin_tags-wordpress","plugin_contributors-wmeric","plugin_committers-wmeric"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/hide-categories-on-shop-page.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>This free WooCommerce extension permits you to hide categories on your shops main page.\nFor this you have to save the categories with ',' seperated in woocommerce &gt; settings &gt; products tab section.<\/p>\n\n<p>In order for this to work you have to have Categories displayed. This can be set via Customizer. Appearance &gt; Customize &gt; WooCommerce &gt; Product Catalog.<\/p>\n\n<p>\"Choose what to display on the main shop page.\" Select Show categories as seen in the Screenshot below.<\/p>\n\n<h3>Additional Information<\/h3>\n\n<p>For users who has a different\/custom page for their shop you can edit the wc-hide-categories.php file\nFind line # 127 and remove \/\/<\/p>\n\n<pre><code>\/\/$mwd_opt4 = in_array( 'product_cat', $taxonomies ) &amp;&amp; ! is_admin() &amp;&amp; is_page('YOUR_PAGE_SLUG'),\n<\/code><\/pre>\n\n<p>Then find line #129 <code>\/*|| $mwd_opt4*\/<\/code><\/p>\n\n<p>Change to\n    || $mwd_opt4<\/p>\n\n<p>To remove products from those categories find line 160<\/p>\n\n<pre><code>\/\/ Uncomment the function below if you also want those products hidden\n\/*\n    add_action( 'woocommerce_product_query', 'mwd_hwcosp_remove_product_in_cat' );\n\n    function mwd_hwcosp_remove_product_in_cat( $q ) {\n        \/\/hwcosp_global is the databse row entry\n        $opt_terms = get_option('hwcosp_global');\n\n        \/\/ Processes our users data to the way we want it from above\n        $data = mwd_hwcosp_comma_separated_to_array($opt_terms);\n\n        $tax_query = (array) $q-&gt;get('tax_query');\n        $tax_query[] = array(\n                             'taxonomy' =&gt; 'product_cat',\n                             'field' =&gt; 'slug',\n                             'terms' =&gt; $data, \/\/ Set Category Slug which products not show on the shop and Archieve page.\n                             'operator' =&gt; 'NOT IN'\n                            );\n        $q-&gt;set( 'tax_query', $tax_query );\n    }\n*\/\n<\/code><\/pre>\n\n<p>The code is well documented so its easy to find what part you are looking for<\/p>\n\n<p>If you have any question please ask in the support forum, Thanks<\/p>\n\n<!--section=installation-->\n<ul>\n<li>Upload 'wc-hide-categories.zip' like any other plugin or upload the zip file contents to the '\/wp-content\/plugins\/' directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<li>Configure the plugin at Dashboard &gt; WooCommerce &gt; Settings &gt; Products &gt; Hide Categories On Shop Page<\/li>\n<li>Save your settings with the category slugs with ',' seperated.<\/li>\n<li>I.E. cat1, cat2, cat3<\/li>\n<\/ul>\n\n<!--section=faq-->\n<dl>\n<dt id='does%20this%20work%20on%20multisite%3F'><h3>Does this work on Multisite?<\/h3><\/dt>\n<dd><p>As of version 1.1.0 Yes<\/p><\/dd>\n<dt id='i%27d%20like%20to%20donate%2C%20how%20can%20i%3F'><h3>I'd like to donate, how can I?<\/h3><\/dt>\n<dd><p>Click the donate button to the right or go here https:\/\/www.paypal.me\/matrixwd\nAnd thank you in advance :)<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.1.3<\/h4>\n\n<ul>\n<li>Added missing line if foreach loop and fixed versioning numbers<\/li>\n<\/ul>\n\n<h4>1.1.2<\/h4>\n\n<ul>\n<li>Updated Foreach() that was causing a PHP warning: Attempt to read property \"slug\" on int ... line 147<\/li>\n<\/ul>\n\n<h4>1.1.1<\/h4>\n\n<ul>\n<li>Updated Readme<\/li>\n<\/ul>\n\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>Updated so that it now works on Wordpress Multisites<\/li>\n<li>Added new comments to the code so its easier to follow on what block does what<\/li>\n<li>Added the ability to hide sub categories<\/li>\n<li>Added the ability to hide all products under root category and sub category<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>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.<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>Stable initial release<\/li>\n<\/ul>","raw_excerpt":"Simple solution to hide specific categories in you woocommerce shop main page i.e. domain.com\/shop This plugin was based on WC Hide Categories On Shop &hellip;","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ceb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/85402","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ceb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/ceb.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/ceb.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=85402"}],"author":[{"embeddable":true,"href":"https:\/\/ceb.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/wmeric"}],"wp:attachment":[{"href":"https:\/\/ceb.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=85402"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/ceb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=85402"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/ceb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=85402"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/ceb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=85402"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/ceb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=85402"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/ceb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=85402"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}