Title: ACF Post Object empty return
Last modified: June 13, 2019

---

# ACF Post Object empty return

 *  [crooy3](https://wordpress.org/support/users/crooy3/)
 * (@crooy3)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/acf-post-object-empty-return/)
 * I have custom post type called “Projects” and inside single-project.php view 
   want to show Posts related to Project. I have tried to solve that problem by 
   using ACF’s Post Object but got nothing from The Loop. I searched for the solution
   on Stackoverflow and AFC support page and I could not find a problem.
 * Maybe this ‘Post Object’ option is not even created for something like this. 
   I don’t know.
 * Code inside single-project.php
 *     ```
       if( $post_object ):
   
           // override $post
           $post = $post_object;
           setup_postdata( $post );
   
           ?>
           <div>
               <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
           </div>
           <?php wp_reset_postdata(); // IMPORTANT - reset the $post object so the rest of the page works correctly ?>
       <?php endif; ?>
       ```
   
 * ACF configuration [https://i.imgur.com/FNnUbiw.jpg](https://i.imgur.com/FNnUbiw.jpg)
 * New post configuration [https://i.imgur.com/IHQqR0P.jpg](https://i.imgur.com/IHQqR0P.jpg)
 * Custom post type output [https://i.imgur.com/YFugBZl.jpg](https://i.imgur.com/YFugBZl.jpg)
 * In the place of question marks, I want to show Posts related to that Project.

The topic ‘ACF Post Object empty return’ is closed to new replies.

 * ![](https://ps.w.org/advanced-custom-fields/assets/icon.svg?rev=3207824)
 * [Advanced Custom Fields (ACF®)](https://wordpress.org/plugins/advanced-custom-fields/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/advanced-custom-fields/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-custom-fields/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-custom-fields/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-custom-fields/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-custom-fields/reviews/)

## Tags

 * [$post object](https://wordpress.org/support/topic-tag/post-object/)

 * 0 replies
 * 1 participant
 * Last reply from: [crooy3](https://wordpress.org/support/users/crooy3/)
 * Last activity: [6 years, 11 months ago](https://wordpress.org/support/topic/acf-post-object-empty-return/)
 * Status: not resolved