Home › Forums › Front-end Issues › How to get acf user image in search results? › Reply To: How to get acf user image in search results?
Hi Eliot,
Thank you for taking the time to help me with my problem
I tried what you suggested, iremoved the global $post and for both variables, author_badge and author_id
Both returned empty or blank.
I then did a var_dump on them
and for author_id the result was string(0) “”
and for author_badge the result was bool(false)
I use the same code on a static template outside the loop and it works as expected.
Is it because Im in the wp loop of trying to access acf custom user data?
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.