WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce Categories - Sub-Categories Shortcodes & Page Display Issues (5 posts)

  1. Mike
    Member
    Posted 5 months ago #

    Hi Everyone,

    I read through some older posts on the topic of WooCommerce, Categories and Subcategories.

    Here is my Issue.

    The WP site I am creating has multiple product families and products (ie parent and childs).

    For each Parent Page I am looking to display only the product categories for this particular parent, and not show on this particular page, all of the products.

    I've figured out how to show all top level categories across all parents, I've figured out how to display all products for the site and I've figured out how to display all parents but I am struggling to figure out a breakdown like this -

    Page A
    Parent A Category
    Parent A Sub Categories

    Page B
    Parent B Category
    Parent B Sub Categories

    Any help would be appreciated for shortcode hints as the following has not worked for me -
    [product_categories number="12" parent="0"]

  2. tremblayly
    Member
    Posted 4 months ago #

    I'd like to know too!

  3. esmi
    Theme Diva & Forum Moderator
    Posted 4 months ago #

    @tremblayly: If you require assistance then, as per the Forum Welcome, please post your own topic.

  4. tremblayly
    Member
    Posted 4 months ago #

    Very well

  5. websta
    Member
    Posted 2 weeks ago #

    I am also wondering about this exact issue.

    (I could copy and paste Mike's post to a new topic, Esmi, but an answer or suggested link would be most helpful.)

    The code examples on the Woocommerce shortcodes page does include this:

    array(
         'number' => 'null',
         'orderby' => 'name',
         'order' => 'ASC',
         'columns' => '4',
         'hide_empty' => '1',
         'parent' => '',
         'ids' => ''
    )

    I am wondering if I could insert comma-delimited category-id-numbers there, if that would work?

    Also, if it would work, how could we get this code to display on a post/Page? I assume Woocommerce expects anyone using their cart to already know how to couch that snippet in code to make it work (I don't).

    This seems like a fundamental issue, for any cart; selected product subcats need to be arranged on specific Pages. Just like every store IRL, ever.

    And perhaps there is a super obvious solution, but for the life of me, I haven't been able to find it in weeks of (off and on) searching.

    ANY HELP APPRECIATED.

Reply

You must log in to post.

About this Topic