displaying acf values on results.php

Forums › Forums › Search & Filter Pro › displaying acf values on results.php

Tagged: 

Viewing 5 posts – 1 through 5 (of 5 total)
  • Anonymous
    #208610

    Hello

    I’m a beginner.
    I want to ask how I can show the acf custom field value on the results.php page.

    now i try <?php the_field(‘flow_rate’); ?>
    but can’t work. :'(

    can you help me?
    thank you so much.

    Trevor
    #208613

    First, make sure that you followed the guide for customization here:

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

    Then, editing the code, it would looks something like this:

    <?php if( get_field('flow_rate') ):?>
    <p>Flow Rate: <?php the_field('flow_rate'); ?></p>
    <?php endif; ?>

    Should be all you need.

    Anonymous
    #208632

    can’t work. :'(

    i use custom post type = “Products”
    and make custom field name = “flow_rate”

    I’m not sure if this problem is related to it.

    Trevor
    #208634
    This reply has been marked as private.
    Anonymous
    #208640

    Now it can work.
    The problem has been solved.
    Thank you very much for your help.

Viewing 5 posts – 1 through 5 (of 5 total)
Search & Filter Support
Privacy Overview

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.