Not finding Custom Posts or Custom Taxonomies
-
I have a custom post type registered (public = true) and three custom taxonomies (structured as category-style) for that CPT. Each post in the CPT has *at least* one taxonomy/category assigned from each of the three custom taxonomies.
In my Relevanssi settings, I have selected the CPT as the only “post type” to search on, and have selected each of the three custom taxonomies to be searched. I have many posts that *should* show up for a search, but none do. I have tried searching specifically for a term that is one of the custom taxonomies, for which I know I have at least a dozen posts, but they don’t show up. I get no results found, nothing at all.
If I check for Relevanssi to also search on [standard WP] Posts, then my blog posts show up (those that have the word searched on in the title or body of the post), but still no CPTs.
I’m not having any luck following the instructions I found in your knowledgebase on using tax_query to search for multiple taxonomies (found here: https://www.relevanssi.com/knowledge-base/multiple-custom-taxonomies/), primarily because I am not a coder, and don’t understand (from your example) what the relationship is between “movie_director” as a query variable and “director” as a taxonomy…I don’t know how to relate those to my actual custom taxonomies.
My three custom taxonomies are:
1. Resort Category (resort_category) Hierarchical, allows child categories) – Holds the NAME of the resort chain (example: Parent=Palace Resorts, Child=Moon Palace);
2. Location Category (location_category) – Hierarchical, allows child categories) Holds the NAME of the location where the resort is located (example: Parent=Jamaica, Child=Negril);
3. Interest Category (interest_category) – Hierarchical, but only so that I get ‘checkboxes’ – no child categories planned. Holds terms like “family friendly” or “adults only”.
How do I write a tax_query using my actual custom taxonomies to make Relevanssi search just those terms to find CPTs that match what someone is searching for?
Thanks for any help you can offer. ??
- The topic ‘Not finding Custom Posts or Custom Taxonomies’ is closed to new replies.