I’m trying to display a message on the admin page for the currently logged in user. I’m using the admin_notices hook to display a custom field assigned to all users, but it doesn’t appear.
This is what I’m trying to do:
<?php the_field(‘field-name’, get_current_user_id()); ?>
Solved! Just add ‘user_’ . before get_current_user_id():
<?php the_field(‘field-name’, ‘user_’ . get_current_user_id()); ?>