- This topic has 1 reply, 2 voices, and was last updated 8 years, 8 months ago by .
These forums are now closed and remain for historical purposes.
None of the content applies to the new version 3. For support, get in touch via our contact form.
Forums › Forums › Search & Filter Pro › How to search ALL custom fields for a post type?
Tagged: custom field, force, meta, search
Hi there,
I have a customer’s site where they are using custom fields extensively (ie: post meta). There is no ‘one’ field to query, and they are constantly changing the meta fields.
How can I have Search and Filter Pro search not only title and content, but all custom fields for a post type?
It’s clear that I can apply a filter on one specific meta field, but I’m after the opposite. I want searches to query ALL custom fields (post meta) for a particular post type.
Cheers
Simon
Hey Simon
I’m not sure that thats possible with S&F alone, to use the search box for searching the content of custom fields you can combine S&F with Relevanssi:
https://www.designsandcode.com/documentation/search-filter-pro/3rd-party/relevanssi/
But I’m not sure even Relevanssi would be able to search “all custom fields belonging to a certain post type”.
Because S&F has a cache (and so does Relevanssi), S&F needs to know (when you are setting up your form) which fields to search in – so that it can correctly index all that data – so changing the custom fields “on the fly” is not supported and I doubt it would be for Relevanssi, but it might be worth checking in to.
Thanks
This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.
We also use cookies to store items in your cart as well as allowing your to login on the site.
You can adjust all of your cookie settings by navigating the tabs on the left hand side.
By continuing to use this site, you also agree to our Privacy Policy.
Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.
*Other cookies used for logging in and cart functions will only be used when you use those features and cannot be disabled.
If you disable these cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.
This website uses Google Analytics to collect anonymous information such as the number of visitors to the site, and the most popular pages.
Keeping this cookie enabled helps us to improve our website.
Please enable Strictly Necessary Cookies first so that we can save your preferences!
More information about our Cookie Policy