Forums

[resolved] List pages alphabetically in sidebar (4 posts)

  1. rwilki
    Member
    Posted 3 months ago #

    I'm using some custom code (below) to list pages and child pages in a sidebar. I've read the codex but still can't figure out how to order my pages alphabetically. I would even be fine if they were sorted according to the menu order.

    Here's my code. Any suggestions are welcome.


    [code moderated - please use the pastebin]

  2. alchymyth
    The Sweeper
    Posted 3 months ago #

  3. rwilki
    Member
    Posted 3 months ago #

    Thanks alchymyth. I have read the codex, especially this page a few times. I've tried 'sort_column=menu_order' but it's not working for me. I could be doing something wrong. My code is in pastebin.

    http://pastebin.com/KAgZN4Np

  4. rwilki
    Member
    Posted 3 months ago #

    I figured out what I needed to change. All I needed to change was &sort_column=menu_order& to &sort_column=post_title&

    It was mostly some guessing and trial and error. For those people who just point us to the codex, that does help - usually the answers are there and it was this time. But sometimes knowing where to find/insert the code is a huge time saver.

Reply

You must log in to post.

About this Topic

Tags