Hi
I have added a custom field to the user profiles but cant display it on the front page. I had a look at http://www.advancedcustomfields.com/resources/how-to-get-values-from-a-user/ but cannot get it to work.
My custom field is called user_facebook which has a plain text in it. Can someone help please?
Hi @codynew
In order to display a user value on the frontend, you will need to identify the user_id and then pass this as a second parameter to the_field() function.
You can use the following code:
<?php
$user_ID = get_current_user_id();
the_field('user_facebook', 'user_'. $user_ID);
?>