ACF in ASP result template

Home Forums Product Support Forums Ajax Search Pro for WordPress Support ACF in ASP result template

This topic contains 3 replies, has 2 voices, and was last updated by pbpyrojust18 pbpyrojust18 3 years, 3 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #31054
    pbpyrojust18
    pbpyrojust18
    Participant

    Is it possible to show an ACF in an ASP template? I am doing <?php get_field('divi_overlays_id'); ?> and <?php the_field('divi_overlays_id'); ?> and it is showing up empty.

    #31055
    pbpyrojust18
    pbpyrojust18
    Participant

    <div id='<?php the_field('divi_overlays_id'); ?>' class='item<?php echo apply_filters('asp_result_css_class', $asp_res_css_class, $r->id, $r); ?>'>

    #31059
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Try the functions with the post ID field as well, since that is not a post loop:

    <?php get_field('divi_overlays_id', $r->id); ?>
    
    <?php the_field('divi_overlays_id', $r->id); ?>
    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #31064
    pbpyrojust18
    pbpyrojust18
    Participant

    Works. Thanks so much!

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

You must be logged in to reply to this topic.