• I have a template file for a certain page that has child pages. I read in the codex that you can list the child pages with this code

    <?php if(wp_list_pages("child_of=".$post->ID."&echo=0")) { ?>

    <ul>
    <?php wp_list_pages("title_li=&child_of=".$post->ID."&sort_column=menu_order&show_date=modified&date_format=$date_format");?>
    </ul>
    <?php } ?>

    Is there a way to almost style the child page like a post with a title, excerpt and number of comments instead of putting just the link? Then if there is more than a certain amount of child pages put next links at the base like I would with my blog?

    im sure this is out of the scope of wordpress but it was worth a shot, any ideas?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Short answer: no.

    Longer version: the template tag (wp_list_pages <== see the name) does exactly what says – gives a list of Pages showing their title as clickable link.
    That’s it. You cannot have the content of multiple Pages displayed in one single Page. Use posts if you need them displayed in a similar way as the category or monthly archives view.

    Thread Starter colincameron

    (@colincameron)

    ok thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘List child pages in page template’ is closed to new replies.