Make WordPress Core

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#8469 closed defect (bug) (fixed)

wp_page_menu() should work for static front pages too

Reported by: aaroncampbell's profile AaronCampbell Owned by:
Milestone: 2.7 Priority: normal
Severity: normal Version: 2.7
Component: General Keywords:
Focuses: Cc:

Description

wp_page_menu() is the new function that lets you list your pages as a menu and optionally add a "home" link (named whatever you want).

It uses is_home() to test and should use is_front_page() instead. Additionally, if the front page is a page, it should add that as an exclude when it calls wp_list_pages() so that there isn't a duplicate menu item.

Attachments (1)

8469.001.diff (1.7 KB) - added by AaronCampbell 16 years ago.

Download all attachments as: .zip

Change History (5)

#1 @westi
16 years ago

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

(In [10115]) Make wp_page_menu() respect is_front_page(). Fixes #8469 props AaronCampbell.

#2 follow-up: @ryan
16 years ago

$list_args['exclude'] = get_option('page_on_front');

Should that be .=?

#3 in reply to: ↑ 2 @westi
16 years ago

Replying to ryan:

$list_args['exclude'] = get_option('page_on_front');

Should that be .=?

Good catch

#4 @AaronCampbell
16 years ago

My Bad...thanks

Note: See TracTickets for help on using tickets.