Title: Pulling in Testimonial Fields
Last modified: July 19, 2018

---

# Pulling in Testimonial Fields

 *  Resolved [racoyle56](https://wordpress.org/support/users/racoyle56/)
 * (@racoyle56)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/pulling-in-testimonial-fields/)
 * I am currently developing a testimonial page for my site. I’ve liked using the
   Easy Testimonials plug-in because it’s shortcode works well with my homepage 
   testimonial slider, and the plug-in creates a testimonial post type which I can
   then pull information from and customize on my site’s Testimonials page using
   PHP and Advanced Custom Fields. I have to use custom code over using the list
   shortcode because the testimonials need to include specific buttons and links
   to other pages on the site. My problem is that I cannot figure out the correct
   PHP to pull in the testimonial’s client name and position. How do I pull these
   sections into my code using PHP?
 * <section id=”testimonials” class=”testimonial-section”>
    <?php $args = array(‘
   post_type’ => ‘testimonial’,’orderby’ => ‘rand’,’posts_per_page’ => -1 ); $loop
   = new WP_Query( $args ); while ( $loop->have_posts() ) : $loop->the_post(); ?
   >
 *  <figure>
    “> <?php the_post_thumbnail(‘medium’); ?>  <figcaption> <div> “> <
   h3><?php the_title(); ?></h3>  <div style=”font-style: italic;”> <?php the_content();?
   > </div> <div> <?php echo the_field(‘client’); ?> – <?php echo the_field(‘position’);?
   > </div> </div> </figcaption> </figure>
 *  ” class=”btn btn-red”>
    <?php the_title(); ?>  <?php endwhile; wp_reset_query();?
   > </section>
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fpulling-in-testimonial-fields%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [richardgabriel](https://wordpress.org/support/users/richardgabriel/)
 * (@richardgabriel)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/pulling-in-testimonial-fields/#post-10563305)
 * Hey [@racoyle56](https://wordpress.org/support/users/racoyle56/)!
 * Sorry for the delayed response.
 * You are trying to load custom fields on a post, which you’ll want to do using
   the get_post_meta function, the post ID, and the name of the field you are trying
   to load.
 * [https://developer.wordpress.org/reference/functions/get_post_meta/](https://developer.wordpress.org/reference/functions/get_post_meta/)
 * The name of our client field is _ikcf_client and the name of the position field
   is _ikcf_position.
 * I hope that helps!
 * All the best,
    Richard

Viewing 1 replies (of 1 total)

The topic ‘Pulling in Testimonial Fields’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/easy-testimonials.svg)
 * [Easy Testimonials](https://wordpress.org/plugins/easy-testimonials/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/easy-testimonials/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/easy-testimonials/)
 * [Active Topics](https://wordpress.org/support/plugin/easy-testimonials/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/easy-testimonials/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/easy-testimonials/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [richardgabriel](https://wordpress.org/support/users/richardgabriel/)
 * Last activity: [7 years, 9 months ago](https://wordpress.org/support/topic/pulling-in-testimonial-fields/#post-10563305)
 * Status: resolved