Support

Account

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!