Having multiple parent categories (picking primary)

Forums Product XML Feeds for WooCommerce Having multiple parent categories (picking primary)

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #105748
    zeljko
    Participant

    Or if you could extend the support for “functions” outside WC Product Class so that we are able to grab breadcrumb with “get_breadcrumb” for products, that would probably simplify things even more. Because breadcrumbs use only primary category path automatically.

    #105749
    WPWhale
    Moderator

    Hi,

    Thanks for your detailed post, to start, I’m assuming you’re referring to Yoast primary category since WP & WC don’t define a primary cateogry by default.

    For the hierarchy part, can you try this shortcode:

    [alg_product_terms taxonomy="product_cat" orderby="hierarchy"]

    It should get you the categories in hierarchical order, once this is solved, please send me at [email protected] to see how specifying the primary category can be done.

    Omar

    #105750
    zeljko
    Participant

    Thank you very much on your response. I already use that shortcode, I mean whole plugin works beautifully and does what is said it does, that is why I am writing this because if product is part of multiple parent categories that are on the same level it outputs all the trails, and we need just one to send to referral store (they can’t accept more then one trail – which is how things are with 99% of them), the one Yoast marks as primary as you mentioned.

    I also tried to eliminate other parent categories that are on the same level, because it was said to our client to use just parent category first to mark it as a primary, but you know how clients are, they forget, do not mention things they do and so on so they partially did that, so when other categories are excluded except one which should be the main, part of products are also excluded, that is why I asked if it was possible somehow to have an option for which category trail to include in the output.

    It would be great if that would be the public update because I would like to use your pro version of plugin on other sites and shops, because your is the only one that at this point offers maximum customizations. and I would like to stick with it in the future.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.