I need help, I have a page that I want to display content from the page children, I get the content but not the custom fields!

I've tried this but it dosnt work, what am I doing wrong?

$pages = get_pages('child_of='.$post->ID.'&sort_column=post_date&sort_order=desc&parent='.$post->ID);
    foreach($pages as $page) {

<?php echo apply_filters('the_content', $page->post_content); ?>

<?php echo apply_filters('the_content', get_post_meta($page->post_content, 'custom_tagline')); ?>

<?php } ?>

Please HELP!

1 Answer 1


Change the line

<?php echo apply_filters('the_content', get_post_meta($page->post_content, 'custom_tagline')); ?>


<?php echo apply_filters('the_content', get_post_meta($page->ID, 'custom_tagline')); ?>

See http://codex.wordpress.org/Function_Reference/get_post_meta

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.