Support

Account

Home Forums General Issues get_field() not working on edit.php admin pages

Unread

get_field() not working on edit.php admin pages

  • Within my admin I am using the following code to echo a users custom field data at the top of every page ( 123 = post id within this example ):

    echo "{CUSTOM FIELD}: " . get_field( {ACF_FIELD_ID}, 123 );

    The problem I am having is on every single admin page the CUSTOM FIELD echo’s as expected, but it will not echo on any of the edit.php{?post_type=CUSTOM_POST_NAME} pages.

    The strange thing is, when I add a var_dump( get_field( {ACF_FIELD_ID}, 123 ) ) the custom field echo’s on the edit.php pages, but not without.

    Pls can someone suggest why get_field() won’t work on the edit.php pages?

    KR Ian.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.