WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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!

share|improve this question

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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