I’m using the following code, so that I can put my pages in the order I wish:
<?php wp_list_pages(‘sort_column=menu_order&title_li=<h2>Pages</h2>’); ?>
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.
In the Pages panel, on each page, you can control the Page order in a drop down menu towards the bottom.
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.
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
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.
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.
- The topic ‘Page Order’ is closed to new replies.