Forums Forums Search & Filter Pro How to search ALL custom fields for a post type?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Anonymous
    #38162

    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

    Ross Moderator
    #38231

    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

Viewing 2 posts - 1 through 2 (of 2 total)