Title: [Plugin: Simple Fields] Custom fields with a single post query
Last modified: August 19, 2016

---

# [Plugin: Simple Fields] Custom fields with a single post query

 *  [phantomdentist](https://wordpress.org/support/users/phantomdentist/)
 * (@phantomdentist)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-simple-fields-custom-fields-with-a-single-post-query/)
 * Am having trouble pulling in custom fields meta with a custom single post query
 * Am using this to display a tooltip over a portfolio item with the portfolio items
   related testimonial within the tool tip.
 *     ```
       <?php if($portfolio_testimonial_id)
   
       						{ ?>
   
                               <div class="tooltip">
   
                               <?php
   
       						$post_id = $portfolio_testimonial_id;
       						$queried_post = get_post($post_id); ?>
       						<h3> <?php echo $queried_post->post_title; ?> </h3>
                               <p><?php echo $queried_post->post_content; ?> </p>
   
                               <?php $testimonial_author = simple_fields_get_post_value(get_the_id(), array(5, 1), true); ?>
       						<?php $testimonial_company = simple_fields_get_post_value(get_the_id(), array(5, 2), true); ?>
                               <?php $testimonial_url = simple_fields_get_post_value(get_the_id(), array(5, 3), true); ?>
   
                               <p class="testimonial_meta"><?php echo $testimonial_author; ?></p>
                               <p class="testimonial_meta"><?php echo $testimonial_company; ?></p>
                               <a href="http://<?php echo $testimonial_url; ?>"><?php echo $testimonial_url; ?></a>
   
                           	</div>
   
                               <?php } ?>
       ```
   
 * I know the code I have is not the correct code to do this but I can’t find or
   discover the right code to use. I can’t use a standard or custom loop as nested
   loops start to get really messy and waste a lot of time 🙂
 * Any suggestions?
 * Thanks
 * [http://wordpress.org/extend/plugins/simple-fields/](http://wordpress.org/extend/plugins/simple-fields/)

The topic ‘[Plugin: Simple Fields] Custom fields with a single post query’ is closed
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/simple-fields_fafafa.svg)
 * [Simple Fields](https://wordpress.org/plugins/simple-fields/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-fields/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-fields/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-fields/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-fields/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-fields/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [phantomdentist](https://wordpress.org/support/users/phantomdentist/)
 * Last activity: [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-simple-fields-custom-fields-with-a-single-post-query/)
 * Status: not resolved