Include/Exclude custom field value based on context
-
Hi there! I have a use case where I would like to be able to include/exclude a certain custom field’s value based on different search context.
For example, imagine I have a checkbox that says “search custom field ‘team'” and if that checkbox is ticket, search results would only contain posts where the
team
custom field contains the search term(s). If unticked, these posts would not show up at all, except if the search term also appears in other custom fields. Hope this makes sense 🙂Do you have any recommendations on how to implement something like this with Relevanssi? My first idea was to exclude the custom field from the relevanssi index and then combine the search query with a custom
meta_query
…
- The topic ‘Include/Exclude custom field value based on context’ is closed to new replies.