[wp-trac] [WordPress Trac] #3924: Page order specified on page writing screen is ignored by default

WordPress Trac wp-trac at lists.automattic.com
Wed Mar 7 16:40:40 GMT 2007


#3924: Page order specified on page writing screen is ignored by default
----------------------------+-----------------------------------------------
 Reporter:  johnbillion     |       Owner:  anonymous
     Type:  defect          |      Status:  new      
 Priority:  low             |   Milestone:  2.3      
Component:  Administration  |     Version:           
 Severity:  normal          |    Keywords:           
----------------------------+-----------------------------------------------
 By default, pages are listed in alphabetical order when `wp_list_pages` is
 used. The page order specified on the page writing screen is ignored
 unless it is explicitly set  with the `sort_column` parameter within the
 template.

 Steps to reproduce:

  1. Create two or more pages from `Write > Write Page` and specify a page
 order using the Page Order box on the right hand side. For example create
 a page named "Hello World" with page order 1 and a page named "A Boring
 Page" with page order 2.
  2. Visit your blog home page and note the page order of the list of pages
 in the sidebar is ignored and the pages are listed alphabetically.

 I propose that `wp_list_pages` should instead sort first by `menu_order`
 and then by `post_title` (see attached patch). This means if no page order
 is specified, pages will still be sorted alphabetically which is more
 asthetically pleasing. However if a page order is specified (for one or
 more page) then it will take priority over the alphabetical sorting.

 Example of a scenario:

 Three pages are on your blog:

  1. The default "About" with no page order (defaults to 0).
  2. "Hello World" with no page order (defaults to 0).
  3. "A Boring Page" with page order of 1.

 As it is now, these pages would be listed alphabetically, ignoring the
 wishes of "A Boring Page" to be listed at the bottom.

 With my change to `wp_list_pages` "A Boring Page" will get listed at the
 bottom, as per the specified Page Order, but the rest of the pages will
 still be listed alphabetically. Which is nice.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/3924>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list