Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Is there a way to add a shortcode to a page, in order for that to display the subcategories of a category? (not the products themselves)

I know that you can configure Woocommerce to display it, but I need to have it on a page, so that I can hide it via UAM plugin.

I am aware of the shortcode:

[product_categories number="12" parent="0"]

But that displays only the top categories. I need the child categories of one top category.

share|improve this question
add comment

1 Answer 1

You could easily display the category widget from WooCommerce in a page template using :

the_widget('WC_Widget_Product_Categories'); 

The code with parameters can be find in woocommerce\classes\widgets\class-wc-widget-product-categories.php

share|improve this answer
    
Thanks for the answer, but i would rather solve it without the use of PHP code. I hope there is a way. –  Sofus Albertsen Aug 9 '13 at 12:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.