Forums › Forums › Search & Filter Pro › Results inconsistencies & taxonomy bugs
- This topic has 10 replies, 2 voices, and was last updated 3 years, 10 months ago by Trevor.
-
Anonymous(Private) January 8, 2021 at 9:27 am #272026
Hi there,
I’ve got a form searching 2 post types (post & a custom one) that share 2 taxonomies. There seems to be inconsistencies with the results for certain words, with the more common result being to load all posts which doesn’t seem to line up with the word being searched. There are also 2 search dropdowns for the taxonomies that aren’t being populated on 1st search, but when re-searching are then populated.
Can provide links/access to CMS privately.
Kind regards
HarryTrevor(Private) January 8, 2021 at 9:51 am #272031The issue I think is likely in what you tell me, that you are sharing one of more taxonomies across more than one post type, which you shouldn’t do in WordPress, but it is possible to set it up to do so.
Since ‘term splitting’ was introduced in WordPress, it is not recommended to use the same taxonomy across multiple post types – instead you should use Custom Fields to do this, as these can be applied to multiple post types. If you need to use taxonomies, you need to have/make separate custom taxonomies for each post type, even if they use the same terms.
The consequence of this, is that if you are searching more than one post type (other than in WooCommerce which has Products and Variations as linked post types), you should not use taxonomy fields in the search.
Anonymous(Private) January 8, 2021 at 11:22 am #272064Hiya,
Thanks for getting back to me, they are separate taxonomies that have the same term names in (apologies for not being clear), they have different machine names (but identical user readable names), e.g. ‘categories’ == ‘category’ & ‘peresource’.
Cheers
Harry -
AuthorPosts