• I know very confusing title but I had absolutely no idea how to ask this but i’ll be super descriptive because I think this is very important.

    Ok I have 2 Custom Taxonomies of “Types” and “Countries”

    I use them to filter my t-shirt store

    Example:

    Types:
    – Cotton
    – Silk
    – Polyester

    Countries:
    – USA
    – China
    – France

    The filter is great but here is the problem:

    Lets say I select the Type of “Cotton” and to the rite I can select whatever country I want to filter Cotton with which I will choose “USA”

    Now lets say the Type of cotton is ONLY made in the USA meaning that if I filter Countries with France, China or whatever country besides USA NOTHING will show up.

    Thats just it, if a certain “Type” meaning my first taxonomy does NOT have a product that is assigned to lets say China when I select Cotton I should NOT see China ONLY the countries that the products have in common with it meaning I should only see USA.

    How can I achieve this because it seems whenever I select a certain type I see a list of useless Countries that are not affiliated with that type. Therefor I see a blank page because there is NO product that is cotton made in any other country other than USA when selecting “Cotton”.

    I mean I am the only one that would know that in my website there is no other product that has the taxonomy Cotton and the taxonomy China together only Cotton and USA. So if I were a customer and try to filter Cotton with China I would get a blank page. I just think it would be better if it did not give me that useless option of China in the first place.

    Sorry for the long explanation I tried to make this as descriptive as I possibly could because I believe this will be useful to many people and help your plugin be a lot better.

    Thanks Jonathan really appreciate your work!

    https://wordpress.org/plugins/beautiful-taxonomy-filters/

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

    (@jonathandejong)

    Hi,

    I do understand where you’re coming from and I think it could be a nice feature.
    The issue lies in the fact that I would have to do some custom querying to figure out which terms are currently “in use” when one or more filters have been selected.

    At the moment I don’t know how to do this without querying each post in the resulting query (from the filtering) for each taxonomy and then run a loop to figure out which terms to exclude. I think it would be far from optimal when considering performance so it’s a hard nut to crack since I want the plugin to have minimal impact on loading times etc.

    Thread Starter lucaz5520

    (@lucaz5520)

    hmm maybe what you can do is when the term is filtered as soon as it is selected it automatically filters without having to click filter, therefore you would already know which one is “in use”. Think this may be achievable with some AJAX or JQuery for the select box to be selected without having to click filter. I’ll try and look more into this and see if I can come up with something.

    Plugin Author Jonathandejong

    (@jonathandejong)

    That actually doesn’t really change anything. I’d still need to look at all the posts resulting from the filter and determine which terms are still of interest.

    I have an AJAX feature planned already altho I’m not sure when and how it will be implemented. But I’ve used AJAX quite a bit so the technical stuff I’m well versed in 🙂

    Thread Starter lucaz5520

    (@lucaz5520)

    Ahh I see well I hope to see your new AJAX feature in the near future :]

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How can I only see the taxonomies of a certain category?’ is closed to new replies.