Home › Forums › Backend Issues (wp-admin) › How do you access a User ACF field from a Post Query? › Reply To: How do you access a User ACF field from a Post Query?
Just an FYI, You are in the correct widget. Post Widget. The Query section, is asking for the name of a Code snippet that defines what posts will be included when the page is displayed. This php code is defined using the Code Snippet plugin. The query could be as easy as saying category_name, Dogs , This would be inside PHP. I can get the User ID or name or Bio but I can not Get the ACF fields linked to the user. It comes back blank.
I got a work around but I would still like to figure out how to access thses User profile fields through the PHP querry code. They work with Dynamic fields in Elementor. If you look at the attached image, this code does not work, If I use the decription field in the $vari= line, that works. I must be missing something simple.
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.