Show only specific Product Categories on homepage
This seems to have been covered in bits in the past but I can’t find a full explanation for this particular problem.
I’m using WooCommerce with the Mystile theme, and I’m trying to find the simplest and most efficient way to show ONLY TWO of the main categories on the homepage. So I either need to find a way to hide all the other categories AND subcategories, or code to show only categories 20 and 21 (these are the category IDs)
I started by trying to find out how to disable the subcategories but the only info I can find on this is from earlier versions of WooCommerce e.g. http://www.skyverge.com/blog/hide-certain-woocommerce-subcategories-catalog/
I have also been looking at how to exclude categories using wp_list_categories but I’m not sure if I can transfer the categories-template.php to a child theme, or even if I need to. I’m also not sure that’s the most efficient solution to the problem, especially as we may be adding more categories and subcategories in the future which will also need to be hidden.
Can anyone provide a solution?
- The topic ‘Show only specific Product Categories on homepage’ is closed to new replies.