Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Handling articles posts belonging to more than one taxonomy
- This topic has 5 replies, 2 voices, and was last updated 6 years, 11 months ago by
Ernest Marcinko.
-
AuthorPosts
-
July 2, 2019 at 5:51 am #23552
Curiousian
ParticipantHello again,
This time I’m looking to figure out how I might post a search form with results that filters for a specific item in a taxonomy (this case activity type). A good example would on this page:
https://membres.schoolofhappiness.ca/les-etirements/It says there are no results, but in fact there are 2 or 3 articles (posts) categorized in “etirements” and “yoga”.
Do I need to duplicate the posts, which I prefer not to, and assign one to “etirements” and the other to “yoga”?
Or is there settings that could handle this problem?
By the way, how does the search engine handle this kind of inquiry with 2 elements of a same taxonomy, but we only want one of them? (curiosity)
Thanks,
IanJuly 2, 2019 at 9:24 am #23556Ernest Marcinko
KeymasterHi Ian,
I believe the issue in this case is caused by the simultanious use of filters, as well as taxonomy exclusions and inclusions (under the Advanced Options panel). You currently have the ‘Yoga’ category excluded, then the ‘Etirements’ category included – but the exclusions always have priority, so that anything beloning under ‘Yoga’ are excluded, regardless of the inclusion, even if it belongs under ‘Etirements’: https://i.imgur.com/fmZPbjl.png
Usually, in combination with the filters I only recommend using only the taxonomy exclusion options. The drop-down filter is already inclusive based, so adding another inclusion will make it too complicated.
Note on the taxonomy exclusions: it will exclude anything that matches any of the selected taxonomy terms. That means, you don’t have to exclude combinations, anything belonging to any of the terms will be excluded. Generally I recommend using the least amount of items there, as it may affect the performance.
I hope this helps!
July 2, 2019 at 6:57 pm #23571Curiousian
ParticipantI understand. Thank you for the explanation.
So how do you think I should go about displaying results that belong to two categories, “yoga” and “etirements”, but have the “yoga” one appear in the search but not the “etirements” and the other way around?
What I gather from your comment is to either not have items belonging to two categories, and therefore create duplicates of the items but assign one to >yoga> and the other to “etirements”. Then in this case I will end up with duplicates in a search form that displays all categories, or is there a “do not display duplicates” function in Ajax Search Pro… I thought I saw it, but not sure where, and if it is what I think it is.Thanks,
IanJuly 3, 2019 at 1:59 pm #23585Ernest Marcinko
KeymasterIn that case, maybe using the inclusion would be much better, as it resolves the overlapping categories. Try only icluding the ‘yoga’ category under the Advanced Options panel, and not excluding anything whatsoever. It should force only the ‘yoga’ category.
Then, try a few test searches. If not quite correct, then also try turning off this option. The results should be anything from ‘yoga’ and matching the filter options.
Let me know about the results.July 3, 2019 at 6:12 pm #23593Curiousian
ParticipantHi Ernest,
Thanks for the response. What you suggested about working with the inclusions rather than the exclusions works.
I also ticked the function you thought I might want to consider.
It works now. The way I was trying to get it to.
Problem solve, ticket resolved
Thanks,
IanJuly 4, 2019 at 9:13 am #23597Ernest Marcinko
KeymasterYou cannot access this content.
-
AuthorPosts
- The topic ‘Handling articles posts belonging to more than one taxonomy’ is closed to new replies.