Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#7914 closed defect (bug) (fixed)

wp_page_menu different results from echo and other parameters

Reported by: MichaelH Owned by:
Milestone: 2.7 Priority: high
Severity: normal Version: 2.7
Component: Template Keywords:
Focuses: Cc:


When using the wp_page_menu template tag, not sure what the 'echo' parameter is intended to produce. Used in conjunction with 'title_li' and 'show_home' even more questions...

These both cause slightly different results, but shouldn't echo=0 display nothing?:



This shows the title at the top of the list, the pages, then Home as the last page listed:

wp_page_menu('title_li=Title for wp_page_menu&echo=1&show_home=1')

This shows Home, then the title, then the rest of the pages:

wp_page_menu('title_li=Title for wp_page_menu&echo=0&show_home=1')

This shows the list of pages with Home at the end:


This shows Home followed by the remaining pages:


Using 2.7-almost-beta updated ~ 9am EST this date

Reference: ticket:7698

Attachments (1)

7914.diff (613 bytes) - added by MichaelH 10 years ago.
Delete title_li, make echo=true and sort_column=post_title to be consistent with wp_list_pages

Download all attachments as: .zip

Change History (7)

#1 @ryan
10 years ago

  • Milestone changed from 2.8 to 2.7

[7914] fixes echo.

I think wp_page_menu() needs to do its own title_li handling instead using wp_list_pages() title_li.

#2 @ryan
10 years ago

  • Priority changed from normal to high

#3 @ryan
10 years ago

[9245] fixes echo, not 7914.

#4 @ryan
10 years ago

(In [9246]) wp_page_menu() echo fixes. see #7914

#5 @ryan
10 years ago

That should fix the echo. It also removes title_li support. I'm not sure that's useful here.

10 years ago

Delete title_li, make echo=true and sort_column=post_title to be consistent with wp_list_pages

#6 @ryan
10 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [9254]) Tweak wp_page_menu() defaults. Props MichaelH. fixes #7914

Note: See TracTickets for help on using tickets.