Support

Account

Home Forums Add-ons Repeater Field User Field In A Repeater Reply To: User Field In A Repeater

  • I did actually manage to get this working, for displaying the display_name at least. The final code I used was:

    <span class="staff-note-label">Note Added By:</span>
    <?php
    $user = get_sub_field("staff_member");
    
    if( $user ): ?>
    
    <span class="staff-note-name"><a href="<?php echo $user['user_url']; ?>"><?php echo $user['display_name']; ?></a></span>
    
    <?php endif; ?>

    I’m unable to get the url to the User’s profile though. The url is showing as the current post url. I’m sure that user_url is the right meta and I noticed there’s code for the user_url in the multiple selected users example at:

    https://www.advancedcustomfields.com/resources/user/

    But I tried it with a multi select user field as well and used the second example code and the link is still for the current post and not the user profile url. How can I get the link for the user’s profile in this context?

    Thanks.