Title: Query child posts fields
Last modified: August 20, 2016

---

# Query child posts fields

 *  [waynmeyer](https://wordpress.org/support/users/waynmeyer/)
 * (@waynmeyer)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/query-child-posts-fields/)
 * Hi Dev friends.
 * Im currently loving this plugin, its made my life so easy. I would like to know
   how can i display images from child posts group fields….i have tried various 
   ways and searched everywhere im down two days and still cant figure this out.
   Please could you help me it would be greatly appreciated.
 * Here is the code im using
 * <?php while ( have_posts() ) : the_post(); ?>
 *  <h1><?php the_field(‘about_your_company’); ?></h1>
 *  <img src=”<?php the_field(‘business_logo’); ?>” class=”hero-image” />
 *  <p><?php the_content(); ?></p>
 *  <?php $child_posts = types_child_posts(‘restaurant-menu’);
    foreach ($child_posts
   as $child_post) { echo $child_post->post_title; echo $child_post->fields[‘food_price’][
   0]; echo $child_post->fields[‘food_image’][0]; } ?>
 *  <?php endwhile; // end of the loop. ?>
 * As you can see im building a restaurant menu with repeater fields. Im able to
   get the post data fields, however the image comes thorough RAW just a URL. i 
   need the image to be an object. I have been trying the wpcf-name, this didnt 
   work, i tried the url=”false” this didnt work either. Unles im doing it wrong,
   hence im here for advice.
 * Im building a mobile app with wordpress as CMS and a themeswitcher for mobile
   views where the front end will be an “app builder” for clients. Thank you for
   a great plugin and add-ons, this is really a must have for any new developers
   looking to explore template design.
 * Kind regards
    Wayne -“types biggest new fan” 🙂
 * [http://wordpress.org/extend/plugins/types/](http://wordpress.org/extend/plugins/types/)

The topic ‘Query child posts fields’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/types_ced1d3.svg)
 * [Toolset Types - Custom Post Types, Custom Fields and Taxonomies](https://wordpress.org/plugins/types/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/types/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/types/)
 * [Active Topics](https://wordpress.org/support/plugin/types/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/types/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/types/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [waynmeyer](https://wordpress.org/support/users/waynmeyer/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/query-child-posts-fields/)
 * Status: not resolved