Home › Forums › Front-end Issues › Field Type "User", only show the posts that the "User" is selected › Reply To: Field Type "User", only show the posts that the "User" is selected
Hi @sbrenner7
You can find the currentl logged in use with this WP code:
http://codex.wordpress.org/Function_Reference/wp_get_current_user
After you have the user ID, you can then perform a query on the WP posts via the get_field function.
You can find info on that here:
http://www.advancedcustomfields.com/resources/how-to/how-to-query-posts-filtered-by-custom-field-values/
The meta_name is the field name, and the meta_value is the user ID selected
Thanks
E
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.