Skip to:

Opened 13 years ago

Closed 13 years ago

#3621 closed defect (bug) (fixed)

current-menu-item class not being applied on nav menu state

Reported by: doctordr's profile DoctorDR Owned by: djpaul's profile DJPaul
Milestone: 1.6 Priority: normal
Severity: minor Version: 1.5
Component: Core Keywords:


I have set up a wordpress page 'Discussions' for my site wide forums, which surprisingly doesn't create a menu item automatically, so I've reverted to a custom menu. Now that I have added the 'Discussions' page to my custom menu it works fine expect the 'current-menu-item' class is not added to the tag and therefore does not take on the selected item CSS.

Im testing all of this on my dev environment (BP1.5, bb2.0, WP3.21 with bpdefault theme).

Change History (5)

#1 @DJPaul
13 years ago

I think this appears to occur for any BP component mapped to a custom page, when used with custom nav menus. We might consider setting $wp_query->is_singular=true in bp_core_load_template() -- it seems to correct the issue but I'm not sure why we don't need to do this for our "default" pages (e.g. "groups", "members" and the other defaults we create).

#2 @boonebgorges
13 years ago

  • Milestone changed from Awaiting Review to 1.6
  • Severity changed from normal to minor

#3 @DJPaul
13 years ago

I've looked at this again. Setting is_singular=true is what a regular WordPress page does, and as we set is_page=true bp_core_load_template(), it should be ok.

#4 @DJPaul
13 years ago

  • Owner changed from Steve Davies to DJPaul
  • Status changed from new to assigned

#5 @djpaul
13 years ago

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

(In [5227]) Set is_singular to fix WP's custom menu selected logic. Fixes #3621

Note: See TracTickets for help on using tickets.