Forums Forums Search & Filter Pro Search Results With CPT & ACF fields

Viewing 8 posts - 1 through 8 (of 8 total)
  • Trevor
    #244955
    This reply has been marked as private.
    Anonymous
    #244965
    This reply has been marked as private.
    Trevor
    #245092

    I had to rebuild the cache. You also had a setting for Relevanssi enabled, but with no search box and that plugin not installed anyway, that may also have been an issue.

    Anonymous
    #245126

    Yeah, I turned it on just because I was trying everything. I don’t see it working now though, not sure what rebuilding the cache did. Were you able to get the ACF fields to return in the results too?

    Trevor
    #245136

    This is what I see. To get the fields to show in the results you would need to code them into the template, using this guide:

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

    The extra code would likely need to look like this:

    <?php $county = get_field('county');
    if( $county ) { ?>
    <div class="county-field">County: <?php echo $county; ?></div>
    <?php } ?>
    Anonymous
    #245147
    This reply has been marked as private.
    Anonymous
    #245149
    This reply has been marked as private.
    Trevor
    #245153

    Thanks for letting me know. I will close this thread for now.

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