WordPress.org

Support

Support » Themes and Templates » wp_list_pages sorting parameter

wp_list_pages sorting parameter

  • 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.

    Thanks.

  • The topic ‘wp_list_pages sorting parameter’ is closed to new replies.
Skip to toolbar