Home › Forums › General Issues › User Name Field – Display Name Only › Reply To: User Name Field – Display Name Only
I have a similar problem. How to display nicknames of users using repeater field and user field. User field works fine when i use it without repeater. When use repeater field and try to display nicknames i see: “1aaaf2<3GMGgGm2<5PppPp2” not nicknames (admin user2 john).
Here is my code:
`<?php while( has_sub_field(‘secret_content_new’) ): ?>
<?php $premium_user = get_sub_field(‘premium_user_list’);?>
<?php if ( $premium_user ) : ?>
<?php foreach($premium_user as $value) {
echo $value[‘nickname’] ;
};?><?php endif;?>
<?php endwhile; ?>`
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.