Support

Account

Home Forums Front-end Issues Get 'the field' when catching page

Solved

Get 'the field' when catching page

  • How can I echo fields when catching pages

    $pages = get_pages(‘sort_column=menu_order’);

    foreach($pages as $page)

    {

    $content = apply_filters(‘the_content’, $page->post_content);

    ?>

    <section name=”<?php $page->the_field(“name”); ?>”>

    <?php echo $content; ?>

    </section>

    <?php } ?>

  • Ok, I did find it.. 🙂

    <?php echo get_field(‘name’, $page->ID); ?>

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Get 'the field' when catching page’ is closed to new replies.