Same taxonomy facet not showing.

  • techgf
    Participant
    # 5 months, 3 weeks ago

    I have 2 taxonomies and 2 filters:
    -produt_cat
    -shop-categories
    When I’m on a product_cat taxonomy archive I can only see the facet filter for shop-categories.
    And when I’m on a shop-categories taxonomy archive I can only see the facet for produt_cat

    I actually only want to see one filter “shop-categories” that works well on a product_cat tax archive, but it is not being shown on the shop-categories tax archive.
    Basically, the filter is not shown on the same taxonomy, only if it is a different one.

    Thanks

    • This topic was modified 5 months, 2 weeks ago by wpsolr.
    wpsolr
    Keymaster
    # 5 months, 3 weeks ago

    Let say you have 2 category terms produt_cat-1 and produt_cat-2, and you are on produt_cat-1 archive page.
    produt_cat-2 filter would be displayed if at least one of your product carries both produt_cat-1 and produt_cat-2 (produt_cat-1 is preselected therefore not shown)

    techgf
    Participant
    # 5 months, 3 weeks ago

    I’m on Product_cat(taxonomy) best-sellers(term) -archive and i want to filter further using Product_cat.(taxonomy)
    For example I visit the archive for Product_cat with the term “best sellers” in a url something like /products/best-sellers
    But I want to use the same taxonomy to filter further using a facet, I want to be able to check “gluten free food”(term) using the same taxonomy.
    Is that possible?

    Here is a example of a product with 2 terms of the same taxonomy https://www.dropbox.com/s/xiwwbqitnr7ni9c/Example%201.jpg?dl=0, if I visit the archive for best sellers(term), the facet to filter “gluten free food”(term) is not showing. I can only see the facets for a different taxonomy.https://www.dropbox.com/s/plgc8ur9h5di6og/only-different.jpg?dl=0

    techgf
    Participant
    # 5 months, 3 weeks ago

    Sorry, open the links in new window or tab to see the screenshots

    wpsolr
    Keymaster
    # 5 months, 3 weeks ago

    Can you set Product_cat facet as “hierarchical”, then reindex?

    techgf
    Participant
    # 5 months, 3 weeks ago

    Still the same only showing facets for a different taxonomy

    wpsolr
    Keymaster
    # 5 months, 3 weeks ago

    Only children terms of the current term’s archive are displayed in facets, not siblings.

    Will investigate…

    • This reply was modified 5 months, 3 weeks ago by wpsolr.
    techgf
    Participant
    # 5 months, 3 weeks ago

    Thank you.

    wpsolr
    Keymaster
    # 5 months, 2 weeks ago

    After digging in the code, it appears that this is a UI design decision: the query returns all terms, but the UI only displays children, not siblings of the archive term.

    I moved this topic in the features requests forum.

    Be also aware that category taxonomies do not support the ‘OR’ operator.

    techgf
    Participant
    # 5 months, 2 weeks ago

    Thank you again.
    I made it work the way I wanted by adding an extra checkbox field on ACF, copying the categories from the taxonomy to the newly added field and then using that data to filter. That way, I can use that filter on any taxonomy and also use “OR” without problem.

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.