Support

Account

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)