Try this alternative way of getting the post objects. Seeing as your loop seems to be using the global post data anyway, this method uses setup_postdata to set the global values.
$post_objects = get_field('post_objects');
if( $post_objects ): ?>
<ul>
<?php foreach( $post_objects as $post): // variable must be called $post (IMPORTANT) ?>
<?php setup_postdata($post); ?>
<li>
<a href="https://wordpress.stackexchange.com/questions/277091/<?php the_permalink(); ?>"><?php the_title(); ?></a>
<span>Post Object Custom Field: <?php the_field('field_name'); ?></span>
</li>
<?php endforeach; ?>
</ul>
<?php wp_reset_postdata(); // IMPORTANT - reset the $post object so the rest of the page works correctly ?>
<?php endif;
Reference: ACF Post Object documentation
Related Posts:
- get_post_custom stripping styling issue
- get post id in while loops outputting page id
- How to get Advanced Custom Field Value According using POST ID? [closed]
- Guest Author – How to display posts on /author/ archive page
- How do I correctly set up a WP-Query to only show upcoming event-posts?
- Check if checkbox is marked on publish/update post
- Saving custom fields to a custom taxonomy
- ACF to select posts not displaying on blog page
- Getting property of non-object when looping through post objects from ACF
- Update post meta within save_post action
- Saving Post Data in Another Database
- Add hero image to home page (blog format) via the dashboard
- How to display post list in a table layout (multiple queries in single loop)
- WP_Query custom field pass the post id
- If custom field is empty, use one from a previous post
- ACF flexible content block not showing on live site (works locally)
- ACF date picker to trigger category change
- search form for custom fields
- How to work with posts and sub posts?
- Run a function when a custom post is update?
- Template with ACF and Pagebuilder
- Change post value in WordPress
- Assign a day of the week to post, e.g: Assign Monday to post and have it only appear when the day is Monday
- WordPress Request Post All Post ID in a Loop? [closed]
- Auto populate custom fields by post date
- ACF Relationship – Get Parent’s Post Object
- Run function after post is updated
- How do I show the post title if an advanced custom field hasn’t been used?
- How to make a local “scroll to ID” on post?
- Custom post order returning posts from other categories
- How to detect if an ACF custom-field is really in use?
- How to make internal links creating plugin to respect ACF?
- blog posts sorting doesnt work while using get_query_var
- Add javascript when post is published
- One comment per user email per post
- Create A Metabox For A Custom Field
- Show a list of recently viewed posts to a user
- Possible to create a permalink to sort with meta_key?
- Single Post Gallery Using Shortcode
- Get how many days since last post of the current user
- Should ‘setup_postdata()’ be reset with ‘wp_reset_postdata()’?
- Does an action fire when adding a tag via the “Tags” meta box?
- UberMenu list current user’s posts as menu items
- Improving WP_Query for performance when random posts are ordered
- Action hook for new pending posts?
- How To Get Posts With A Specific Word
- Getting index.php instead single.php for displaying posts
- Using permalinks, category slugs, and tag slugs
- How to prevent duplicate posts with wp_insert_post on single.php?
- How to insert 2 args into 1 Wp_Query for a slideshow
- Add multiple tags to multiple posts
- Updating post data on save (save_post vs wp_insert_post_data)
- Lost draft under all posts and drafts
- “edit_published_posts” and “edit_other_post” issue
- Overwrite posts/pages via import
- Auto-realod with new posts // Ajax call
- How many posts does the loop return?
- Posts loop displaying the same post data
- Display Posts on Custom Page
- Blog Post On Home Page Displaying Page Published Date Not Post Published Date
- Counter is skipping post when I still want it visible [closed]
- Divs appearing everywhere in post content
- Latest posts by category — how to exclude current post?
- Posts page not showing correct image
- wp_query with ajax
- Post Title List on home page with time
- Add “Posted on” to post date
- Get x recent posts by author?
- How to compare post tags?
- Get a term each custom post type
- Adjust the order for returned posts
- Post in bulk based on category template
- Delete Post but retain image of post [WP REST API]
- user_has_cap filter allows “edit_others_posts” but not is not allowing updating/publishing
- how to add tags to post in the Loop?
- Add data attribute of post_id for Internal links
- Menu Items disappearing/being empty on save or post edit
- Display/Filter post using if else statement
- Search results for ACF data
- Nestling Posts Under Page & Justify Text
- Redirect to custom post if custom archive page has just one result?
- Strange behaviour in WordPress admin
- How do you update post date (year only) in a separate custom field?
- sometimes on saving a post as draft, it says Access Denied You don’t have permission to access “mywebsite.com/wp-admin/post.php”
- How do I change the post title’s link on the posts page?
- WordPress text field in array problem
- Get query result according to merged array
- Custom URL Structure for posts with subcategories
- Possible to display X number of authors posts from another WordPress site?
- Theme Unit testing not importing on MAMP server – Fatal error: Maximum execution time of 60 seconds exceeded
- Post/Edit/Delete Post From Frontend… How?
- Use radio buttons & checkboxes for post categories
- List posts that are in the same category as the current post title
- Wanting to apply different featured images for each post
- Can I get custom post items in select box (dropdown)
- Making a private post visitable by link?
- Display content from specific category
- Batch Scanning and Deleting Empty WordPress Posts
- WordPress portfolio posts: media not displaying if several images
- Blog page shows the whole blog post instead of the excerpt or summary with the feature image only