WordPress.org

Ready to get started?Download WordPress

Forums

Can't get childs custom fields (1 post)

  1. andy-with-love
    Member
    Posted 1 year ago #

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

    I've tried this but it dosnt work, what am I doing wrong?
    <?php echo apply_filters('the_content', get_post_meta($page->post_content, 'custom_tagline')); ?>

    <?php
    $pages = get_pages('child_of='.$post->ID.'&sort_column=post_date&sort_order=desc&parent='.$post->ID);
    	foreach($pages as $page) {
    ?>
    <div class="five columns">
    <?php echo apply_filters('the_content', $page->post_content); ?>
    </div>
    
    <div class="seven columns">
    <?php echo apply_filters('the_content', get_post_meta($page->post_content, 'custom_tagline')); ?>
    </div>
    
    <?php } ?>

    Please HELP!

Topic Closed

This topic has been closed to new replies.

About this Topic