WordPress.org

Ready to get started?Download WordPress

Forums

Page Order (8 posts)

  1. Amulet
    Member
    Posted 8 years ago #

    I'm using the following code, so that I can put my pages in the order I wish:

    [code]
    <?php wp_list_pages('sort_column=menu_order&title_li=<h2>Pages</h2>'); ?>
    [/code]

    This seems to be working, but I was wondering, if I list, say, four pages, and then I add a fifthbut want No. 5 to be No. 2, do I have to go back and change the numbers for No's. 2-4 to 3-5? If I create a lot of pages, I don't want to have to go back and renumber every page after the newly added page. Is there a simpler way to do this? Thanks.

  2. Lorelle
    Member
    Posted 8 years ago #

    In the Pages panel, on each page, you can control the Page order in a drop down menu towards the bottom.

  3. Beel
    Member
    Posted 8 years ago #

    Set them to 10, 20, 30... to begin with.

  4. Amulet
    Member
    Posted 8 years ago #

    Lorelle, I have no such drop-down menu. I have a text field with "Page order" next to it, where I have to entera number. I've looked in both Manage/Pages and Write/Write Page.

    Beel, thanks for the advice...that helps a bit.

  5. Benev
    Member
    Posted 8 years ago #

    I would like to arrange my pages in the way I want as well, but I have know idea even how to use the code that Amulet poses. Neither do I have a drop-down menu. Filling in a number in the "page order" box, doesn't do anything. Help

  6. moshu
    Member
    Posted 8 years ago #

    Just put that code
    ?php wp_list_pages('sort_column=menu_order&title_li=<h2>Pages</h2>'); ?>
    where you want your Pages listed (e.g. in the sidebar.php template) and during the creation of Pages or, when editing, type a number in the "Page Order" field. This bit
    sort_column=menu_order tells WP to order the Pages list according to the numbers you typed in. (There is NO dropdown, BTW, just a plain text field for the number.)
    More on the usage of the template tag here.

  7. Benev
    Member
    Posted 8 years ago #

    Thanks, I tried that but I cannot edit the sidebar template (under presentation/ theme editor. On the page it says: If this file was writable you could edit it.

  8. moshu
    Member
    Posted 8 years ago #

    Which means you have to chmod that file 666. And after editing it is advisable to change again the permissions.
    Actually I use the theme editor only for minor typos. I edit the template files on my computer and upload them. This means only 1 ftp action.

Topic Closed

This topic has been closed to new replies.

About this Topic