This is from my recent post where I was trying to have the Search Archives page order by a custom field and also have the search use all of the CPTs custom fields.
https://toolset.com/forums/topic/the-add-filter-pre-get-post-is-not-working-using-toolset-custom-field/
I found another post where a user shared some code that allows the search in all custom fields. The code doesn't seem to complicated so I think rolling it into Toolset would be a great idea. Needing to add the Relevanssi plugin to do this seems like overkill.
https://toolset.com/forums/topic/display-search-results-from-custom-posts/
Tim
The code may not look complex, however, could not be added like that to a Plugin, and what is most concerning is simply the performance.
But I also understand your reasoning, maybe we can find solutions for this in future, so I would like to add this as a votable Feature Request.
To do so I need a few more details.
What you want is basically a Query Filter that is able to query by constant, URL parameter or others, in ALL Meta Fields at once?
This is tricky, you see, because I assume, you would like to query only by values on ALL Fields in ONE Post Type, for example?
Or, should this be general, means, query ALL fields in ALL post Types?
That is an important detail as well later when we would implement a GUI for it, if.
Thanks for any additional details, so we can file the proper request
Yes, " a Query Filter that is able to query by constant, URL parameter or others, in ALL Meta Fields at once". And if possible somehow allow the default WP search to access all meta fields, but perhaps that is not possible?
And for my particular situation I'd like to query by values on ALL fields in ONE Post Type, but I can see situations where the general All fields in ALL post Types would be useful.
Tim
We cannot modify the WP Search as that is made by WordPress.
We instead provide the plugin Views, which enhances Search of a WordPress site, based on the WP Query.
Since we are based on that query we are also bound to most of its limitations.
Queries like you describe them are very expensive and I fear most users will not be aware of that - resulting in complaints of slow products, whereas the only issue is an "overkill" query, which we do not provide at the moment.
I have filed the request, let's see how it's traction is and what the developers decide about it in future.
https://toolset.com/feature-request/allow-to-query-by-values-in-several-custom-fields-at-once-eventually-in-several-types-at-once/
https://toolset.com/feature-request/?wpv_post_search=Allow+to+query+by+values+in+several+custom+fields+at+once+eventually+in+several+Types+at+once&wpv-wpcf-plugins=Views&wpv_sort_orderby=post_date&wpv_sort_orderby_as=string&wpv_view_count=686737
I think it will not get a lot of priority due to the fact that you can do this with the (free) Relevannsi and our integration for it.
But, my opinion comes last in this process 🙂
Thanks for the suggestion!