[buddypress-trac] [BuddyPress] #1501: Main nav slugs incorrect while browsing user blogs (easy fix)

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Wed Dec 30 10:33:02 UTC 2009


#1501: Main nav slugs incorrect while browsing user blogs (easy fix)
---------------------+------------------------------------------------------
Reporter:  teebes    |       Owner:     
    Type:  defect    |      Status:  new
Priority:  minor     |   Milestone:  1.2
Keywords:  main nav  |  
---------------------+------------------------------------------------------
Changes (by mercime):

 * cc: mercime (added)
  * priority:  major => minor


Comment:

 Use WPMU's native switch_to_blog and restore_current_blog functions to get
 the navigation of main site with the correct URL's. Done the method below
 or a variation thereof for my installs of WPMU used as CMS.

 Code for sub-blog's theme:

 {{{
 <ul id="nav"
 <?php switch_to_blog('1') ?>
 //copy the navigation code from header.php of either bp-default/bp-sn-
 parent theme
 //or the code used in main site plus any customized links you added in
 main site
 <?php do_action( 'bp_nav_items' ); ?>
 <?php restore_current_blog(); ?>
 </ul>
 }}}

-- 
Ticket URL: <http://trac.buddypress.org/ticket/1501#comment:2>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list