Support

Account

Home Forums General Issues Issue displaying fields in homepage slider. Reply To: Issue displaying fields in homepage slider.

  • Hi @thebluecasket

    The issue is that when you use the the_field function, ACF does not know which post to get it from! You need to specify the post_id so that ACF can correctly load the value.

    You have a while loop which correctly uses the the_post function, so within this loop, you CAN use the get_field function as per normal to store data into the array like so:
    $arr[$i]["custom_field"] = get_field('custom_field');

    Then just echo this out in the later loop, like you are doing for all other data.

    Thanks
    E