• Resolved Pieter Bos

    (@senlin)


    I have used the list subpages code as described on https://codex.www.ads-software.com/Template_Tags/wp_list_pages#List_subpages_even_if_on_a_subpage
    That works perfect, but now I would like to list those subpages in reversed order.

    I have looked at several solutions, so now I have added the sort_column and sort_order strings to the code:
    wp_list_pages(‘title_li=&child_of=&sort_column=ID&sort_order=DESC’.$post->ID.’&echo=0&’);

    However, every time I use those two additional strings my sidebar messes up:

    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 ‘DESC23’ at line 1]
    SELECT * FROM wp_posts WHERE (post_type = ‘page’ AND post_status = ‘publish’) ORDER BY ID DESC23

    Does anyone have a clue about this?

  • The topic ‘listing subpages in reversed order’ is closed to new replies.