- This topic has 1 reply, 2 voices, and was last updated 9 years, 9 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
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