Support

Account

Home Forums Front-end Issues ACF with enfold theme Reply To: ACF with enfold theme

  • Hi @dannhanks

    The get_field() function needs the post ID to be passed as the second parameter if you call it outside The Loop. It should be something like this:

    get_field('excerpt', 99);

    Where ’99’ is the ID of your post. There’re several ways to get the post ID outside The Loop. One of them is by using the post global variable like this:

    global $post;
    $post_ID = $post->ID;

    Then you can use it for the get_field() function like this:

    get_field('excerpt', $post_ID);

    I hope this helps 🙂