Forums Forums Search & Filter Pro ACF data not being fetched and displayed in results

Viewing 10 posts - 1 through 10 (of 12 total)
  • Anonymous
    #185941

    Hi – got the plugin working on my site – but it appears to not be fetching and displaying in the results content from ACF data on pages… How can I ensure the plugin it setup to review this info and return relevant results please.

    Trevor
    #185946
    This reply has been marked as private.
    Anonymous
    #185954
    This reply has been marked as private.
    Trevor
    #185960

    Ah. So, you are using the shortcode results method, and you want to display ACF data. The guide to customising the appearance of the results is here:

    https://searchandfilter.com/documentation/search-results/using-a-shortcode/#customising-the-results

    You will need to do that first and then use the ACF documentation to add your own HTML/PHP to output as you want. This search will give you some snippets already posted on our forum:

    https://support.searchandfilter.com/forums/search/results.php+acf+get_field/

    For example, this post (and thread):

    https://support.searchandfilter.com/forums/topic/output-acf-post-object-fields-in-results/#post-102009

    Anonymous
    #185962

    Hi Trevor – is there an easier solution – e.g. not using ‘shortcut’ results method?

    Anonymous
    #185981

    Trevor – this looks like it will just output fields from ACF – does the search plugin actually search the ACF fields by default?

    Trevor
    #185985

    Yes. You need to add a Post Meta field to the Form UI, then choose the type of field (Date, Number, Choice) and then select the meta key (not the TRUE ACF fiedl does NOT normally start with an underscore).

    Outputting an ACF (or any custom) field is not normally part of any theme’s standard templates, so customisation is almost always needed.

    Anonymous
    #185991

    Sorry – you have lost me.

    I want to get the search and filter plugin to search through the ACF fields I am using on the site. How can I set up the search function so it does this – I understand I need to edit the results.php code to add in relevant placeholders to fetch back the ACF fields there – but how can I specify / make sure that the search function is looking through the ACF fields?

    Trevor
    #185995

    Ah, you want to perform a textual entry search. The Search & Filter Pro Text Search field uses the standard WordPress search, so looks only in the Post Title and Content. To help you control this better, on the form’s Advanced settings tab you will see 2 settings for Relevanssi.

    The documentation for this is here:

    https://www.designsandcode.com/documentation/search-filter-pro/3rd-party/relevanssi/

    You would need to install and activate the free Relevanssi plugin as well.

    Then set it up and build its index (make sure it is indexing the desired post types AND the taxonomies/custom fields that you want to search).

    A simpler alternative is to use WP Extended Search (which requires no options to be set in our plugin).

    Anonymous
    #185997

    Thanks – So to use “WP Extended Search” do you mean not use your Search and Filter plugin anymore – or get Search and Filter to work with the “WP Extended Search” ?

Viewing 10 posts - 1 through 10 (of 12 total)