• I am trying to use this with a WooCommerce site. I’ve been able to list just top-level categories with [a-z-listing taxonomy=”product_cat” display=”terms”], I’ve been able to show all products using [a-z-listing post-type=”product”].

    I would like to know how to show a specific category. For example, if I want to show all the products in the Specials category. How would I go about doing this with the shortcode?

    Is it possible to show all Categories and also subcategories?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Dani Llewellyn

    (@diddledani)

    To display all products in the specials category you would use the terms= attribute:

    [a-z-listing post-type="product" taxonomy="product_cat" terms="specials"]
    

    The difference between this and what you already tried is the omission of the display=terms attribute which switches the list to displaying terms from the taxonomy indicated in taxonomy=. Without the display= attribute the list uses taxonomy= and terms= to filter the post-type= posts.

    Can you elaborate on this post to show how to display all product categories, please?

    Ok so, [a-z-listing taxonomy=”product_cat” display=”terms”] displays all product categories. But how do we display all sub-categories of a specific product category?

    Plugin Author Dani Llewellyn

    (@diddledani)

    It is not possible to show only the descendants of a specific term in a hierarchical taxonomy. The only way to do that is to pull those child-terms into their own taxonomy.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WooCommerce Categories and Subcategories’ is closed to new replies.