Support

Account

Home Forums ACF PRO How to read ACF value??

Unread

How to read ACF value??

  • I have created an ACF numeric field and attached it to the user profile.
    When I view my user profile, there is a field there and I enter in a numeric value such as “123”.
    I save my profile.
    My field name is called group_ID
    I use WP CODE to create a PHP code snippet.

    ==
    $fn=get_field(‘group_id’);

    echo ‘field=[‘ . $fn . ‘]<br>’;

    ==
    When I insert the shortcode value into my page all I get back is field=[] and never a value, despite the value being properly set in my profile.

    How do I read this value from the user profile and capture it as a PHP variable?

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.