Home › Forums › Front-end Issues › Display user field value in template › Reply To: Display user field value in template
This was the solution i’ve come up with now:
$image1 = get_field('profilbild', $user); $image2 = get_field('funbild', $user); $name = get_field('nickname', $user); echo '<li><div class="image_wrapper"><img class="profile1" src="'; echo $image1['url']; echo '"/></div><img class="profile2 hoverShow" src="'; echo $image2['url']; echo '"/><div class="imageOverlay"><p>'; echo "$name"; echo '</p></div></li>';
Maybe this helps anyone reading this later 😉
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!
💻 The next ACF Chat Fridays features a live demo of one of our most highly-requested features: registering CPTs and custom taxonomies directly in ACF. Don’t miss it!— Advanced Custom Fields (@wp_acf) February 27, 2023
📆 Friday 3rd March 3pm UTC
👉 Register here - https://t.co/3UtvQbDwNm pic.twitter.com/j4r4ouQtz9
© 2023 Advanced Custom Fields.