WordPress.org

Ready to get started?Download WordPress

Forums

Custom page lists (2 posts)

  1. minute44
    Member
    Posted 4 years ago #

    I'm looking to have a list of links in the sidebar to only child pages of the current page. How would I go about calling just those links?

    Cheers

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    Try something like:

    <?php if( is_page() && wp_list_pages('title_li=&echo=0&child_of='.$post->ID.) ) :?>
    <ul class="child_pages">
    <?php wp_list_pages('title_li=&child_of='.$post->ID.); ?>
    </ul>
    <?php endif;?>

Topic Closed

This topic has been closed to new replies.

About this Topic