Forums

How to include sub-pages in parent-page (4 posts)

  1. takethebox
    Member
    Posted 2 years ago #

    I would like to add sub-pages from "Reviews" into the parent-page..

    So now I have http://www.takethebox.com/reviews/ and I would like to include all Review-posts (http://www.takethebox.com/reviews/dove-bodylotion/ end that sort of sub-pages) into the http://www.takethebox.com/reviews/ page..

    Already thanks!

  2. Chintaru
    Member
    Posted 2 years ago #

    Download the Exec-PHP plugin to allow PHP code in your posts/pages and paste this in your Reviews page:

    <?php echo wp_list_pages('child_of=id&title_li='); ?>

    With 'id' being replaced with the id of Reviews since it's the parent page of the subpages.

    This page lists all of the arguments defined in the wp_list_images array. This is useful for excluding specific pages for example.

  3. takethebox
    Member
    Posted 2 years ago #

    So, when I activate the plugin I only need to add

    <?php echo wp_list_pages('child_of=id&title_li='); ?>

    Into my page (Dove Bodylotion)? http://www.takethebox.com/reviews/dove-bodylotion/ It's verry difficult..

  4. Chintaru
    Member
    Posted 2 years ago #

    No, only in the Reviews page ;)

Topic Closed

This topic has been closed to new replies.

About this Topic