Home › Forums › General Issues › Ability to list custom fields on a "master" page › Reply To: Ability to list custom fields on a "master" page
Hi @dparadis
This is possible by querying WP for the posts, then looping through them and rendering the ACF data.
1. Query WP for a post type (product) – please consult google
2. Loop through the posts
3. For each post (product), render the ACF data as per normal.
Here are some examples which will help:
* http://www.advancedcustomfields.com/resources/how-to/how-to-query-posts-filtered-by-custom-field-values/
* http://www.advancedcustomfields.com/resources/getting-started/code-examples/
Note: Within your loop, you can use a function called get_the_ID() to get the ID of the current post. Use this value to load the ACF data (second parameter of the_field / get_field)
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.