Quantcast
Channel: WordPress.org Forums » [WooCommerce] Support
Viewing all articles
Browse latest Browse all 104029

Paul on "[Plugin: WooCommerce - excelling eCommerce] Display specific categories in list form - working code example provided"

$
0
0

Just to clarify, you are looking to list all subcategories of a specific category? If so, then this function is already setup to do just that. SImply call this function and insert the term_id for the "outdoors" in the args for that function.

For instance, if your "outdoors" category has a term_id of "3" your call to this function would look like this:

<?php get_product_terms( 3 ); ?>

It seems like the code you have listed here is setup to only run on the front page, so if you might want to copy this function and paste it with a different function name somewhere in your functions file so you can use it elsewhere.


Viewing all articles
Browse latest Browse all 104029

Trending Articles