Title: ACF post object
Last modified: July 24, 2019

---

# ACF post object

 *  Resolved [bartdenhartog](https://wordpress.org/support/users/bartdenhartog/)
 * (@bartdenhartog)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/acf-post-object-3/)
 * Hi,
 * I’m developing a custom theme with ACF and I’ve a question:
 * Via ACF I’ve made a flexible content block where the client can select a review
   in the backend of the site to display in on the front-end.
 * Now I already have can display the_title & the_content but I also need the person’s
   name and the star-rating.
 * How can I display this? Example below:
 *     ```
       <?php 
                       if( $post_objects ): ?>
                           <?php $delay_count = 0; ?>
                           <?php foreach( $post_objects as $post):?>
                               <?php setup_postdata($post); ?>
   
   
                               <div class="col-10 col-sm-10 col-md-8 col-lg-8" data-aos="fade-up" data-aos-delay="<?php echo $delay_count * 200; ?>">
                                   <?php echo the_title(); ?>
                                   <?php echo the_content(); ?>
                               </div>
   
   
                           <?php $delay_count++; ?>
                           <?php endforeach; ?>
   
                       <?php wp_reset_postdata(); ?>
                   <?php endif; ?>
       ```
   

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Gemini Labs](https://wordpress.org/support/users/geminilabs/)
 * (@geminilabs)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/acf-post-object-3/#post-11763986)
 *     ```
       <?php
   
       // Get the review object (assuming that $post is a review post_type)
       $review = apply_filters( 'glsr_get_review', null, $post->ID );
   
       // Print the rendered (HTML) review to the page
       echo $review;
   
       // OR, print a raw (unrendered) value, for example the author name
       echo $review->author;
   
       // OR, print a rendered value, for example, the author name
       $reviewHtml = $review->build();
       echo $reviewHtml->author; 
   
       // You can also print the entire PHP $review object (and rendered HTML) to the screen for debugging
       glsr_debug( $review, $reviewHtml );
   
       // You can also render the star rating like this:
       echo '<div class="glsr-default">';
       echo apply_filters( 'glsr_star_rating', null, $review->rating );
       echo '</div>';
       ```
   
 * For more information, please see the Site Reviews > Documentation > Functions
   page.
    -  This reply was modified 6 years, 10 months ago by [Gemini Labs](https://wordpress.org/support/users/geminilabs/).
    -  This reply was modified 6 years, 10 months ago by [Gemini Labs](https://wordpress.org/support/users/geminilabs/).
 *  Thread Starter [bartdenhartog](https://wordpress.org/support/users/bartdenhartog/)
 * (@bartdenhartog)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/acf-post-object-3/#post-11764046)
 * Thanks for the quick response! It works perfectly, thank you!
 *  Plugin Author [Gemini Labs](https://wordpress.org/support/users/geminilabs/)
 * (@geminilabs)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/acf-post-object-3/#post-11764074)
 * You may also want to first check that the review has been correctly fetched:
 *     ```
       if( $review = apply_filters( 'glsr_get_review', null, $post->ID )) {
           // use the review values here
       }
       ```
   

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘ACF post object’ is closed to new replies.

 * ![](https://ps.w.org/site-reviews/assets/icon-256x256.gif?rev=3307009)
 * [Site Reviews](https://wordpress.org/plugins/site-reviews/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/site-reviews/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/site-reviews/)
 * [Active Topics](https://wordpress.org/support/plugin/site-reviews/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/site-reviews/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/site-reviews/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Gemini Labs](https://wordpress.org/support/users/geminilabs/)
 * Last activity: [6 years, 10 months ago](https://wordpress.org/support/topic/acf-post-object-3/#post-11764074)
 * Status: resolved