Insert code in a loop of subpages
-
Hi,
I am getting the content from sub pages using this:<?php $pages = get_pages('child_of='.$post->ID.'&sort_column=post_date&sort_order=desc&parent='.$post->ID); foreach($pages as $page) { $content = $page->post_content; if(!$content) continue; ?> <li cass="thumbList" > <a href="<?php echo get_page_link($page->ID) ?>" class="clearfix" ><h1 class="title"> <?php echo $page->post_title ?> </h1> <?php $key_1_value = get_post_meta($page->ID, 'Preview', true); print $key_1_value; ?></a> </li> <?php } ?>
I need to be able to insert: <?php get_the_image(); ?> as I do for the meta
Any idea?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Insert code in a loop of subpages’ is closed to new replies.