Hi there,
I'm using get_pages to display sub page content on the parent page. It's working fine for outputting the post title and content, but I can't seem to figure out how to get it to output my custom fields.
Here's the code I'm using:
<?php
$mypages = get_pages('child_of=30&sort_column=post_date&sort_order=desc');
foreach($mypages as $page)
{
$content = $page->post_content;
if(!$content) // Check for empty page
continue;
$content = apply_filters('the_content', $content);
?>
<h5><a href="<?php echo get_page_link($page->ID) ?>"><span><?php echo $page->post_title ?></span></a></h5>
<p><?php echo $content ?></p>
<?php
}
?>
Any help would be gratefully received! Thanks!