Home › Forums › Front-end Issues › Show Custom Fields in a User Profile on Frontend › Reply To: Show Custom Fields in a User Profile on Frontend
HI @reason8
You can access the data from a user using:
<?php
if ( is_user_logged_in() ) :
$user_id = get_current_user_id();
$value = get_field( 'my_field', "user_".$user_id );
if($value):
echo $value;
endif;
endif;
You’d just need to add that in to your template
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.