wp_list_pages sorting parameter (1 post)

  1. mharding
    Posted 8 years ago #

    I have the following line in my header.

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

    For some reason the items are listed in reverse order. When I try to insert the DESC parameter as such...

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

    I get the following error...

    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ASC' at line 1]
    SELECT * FROM wp_posts WHERE (post_type = 'page' AND post_status = 'publish') ORDER BY menu_order DESC ASC

    I did NOT put the ASC sort parameter in.

    Any ideas.


Topic Closed

This topic has been closed to new replies.

About this Topic