Home › Forums › General Issues › Custom My Account Page Using ACF User Fields › Reply To: Custom My Account Page Using ACF User Fields
Hi @hconsalvi
You have an extra semicolon and some syntax errors there. Could you please try this code instead?
<?php $user_ID = get_current_user_id(); $number = 'user_' . $user_ID;
if ( get_field('current_workout_phase', $number) ) {
echo '<p><a href="' . the_field('current_workout_phase', $number) . '" >View My Current Workouts </a> </p>';
} else {
echo "Your current membership level doesn't offer custom workout plans. You can, however <a href='/exercises'> view all of our exercises and their instructions here.</a>";
}
?>
To learn more about PHP, please take a look at this page: http://www.w3schools.com/php/.
Hope this helps!
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.