I am fairly new to WordPress development and ACF (so be kind!). I am trying to create an index page that loops over all of my posts and pulls in some of the custom fields for each of these posts. Let’s say it’s like a custom summary of each post that a user can click on to go to the full post.
Right now, I have the following code in my index.php page:
if ( have_posts() ) : while ( have_posts() ) : the_post();
get_template_part( 'content', get_post_format() );
And then I have this code (tidied up for brevity) in my content.php page:
Hey John, thanks for your reply. I realized my issue was that the loop was only pulling in values from the index page rather than each individual post because I had my homepage set to a static page rather than the blog posts page.
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users