Echo link to users profile
-
Hi,
I have a projects page which has a AFC field ‘allowed_users’, this a multiple/repeater field where multiple users can be specified
Below is the code i am using (within a page template) to output a list of users that are held in an ACF field ‘user’
<?php if( have_rows(‘allowed_users’) ): ?>
- ‘ . $sub_field_3[‘display_name’] . ‘
<?php while( have_rows(‘allowed_users’) ): the_row(); ?>
<?php
$sub_field_3 = get_sub_field(‘user’);
echo ‘
‘;
// do something with $sub_field_3
?>
<?php endwhile; ?>
<?php endif; ?>
It works fine and the front page displays any and all users that have been added.
What i would like to do and so far have been unable to do, is output the display name as a link to the profile of that user?Any ideas?
Thanks
https://www.ads-software.com/plugins/advanced-custom-fields/
- The topic ‘Echo link to users profile’ is closed to new replies.