Quantcast
Channel: Toolset » All Posts
Viewing all articles
Browse latest Browse all 20145

How to display an image in a child posts (for repeating fields)

$
0
0

I have been able to show the post title and basic text ('feature-icon') in a repeating custom field group (via child posts) but I cannot show the image ('feature-icon'). I tried using the same code pattern (fields['xxx']) but it is not working:

<?php $child_posts = types_child_posts('features');
            foreach ($child_posts as $child_post) {
              echo $child_post->post_title;
              echo $child_post->fields['feature-icon'];
              echo $child_post->fields['feature-description'];
            } ?>

Thanks.


Viewing all articles
Browse latest Browse all 20145

Trending Articles