WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Problem listing Pages & excluding one (2 posts)

  1. tikimaticdotcom
    Member
    Posted 8 years ago #

    ok here it is:
    i want to order the list my Pages, so i write:
    <?php wp_list_pages('sort_column=menu_order&title_li='); ?>
    no problemo.

    then if i want to exclude the Page with ID 4, which means:
    <?php wp_list_pages('exclude=4'); ?>
    i write:
    <?php wp_list_pages('exclude=4' . 'sort_column=menu_order&title_li='); ?>

    here is the problemo:
    it excludes the Page, but un-order the list of Pages.

    if i write:
    <?php wp_list_pages('sort_column=menu_order&title_li=' . 'exclude=4'); ?>
    then listing's ok but the Page is not excluded

    Did i write it wrong?

  2. tikimaticdotcom
    Member
    Posted 8 years ago #

    the hell with my brain that sometimes bugs & blocks - sorry to have filled the forum with a useless post

    <?php wp_list_pages('exclude=4&sort_column=menu_order&title_li='); ?>

    fine.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags