Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: How to add a slug to nav and link to a WPMU page


epsi
Participant

@epsi

Use wp_list_pages in bp_nav_items action to display all pages in tab menu.

define( 'BP_CUSTOM_PAGE_SLUG', 'overview' );
add_action( 'bp_nav_items', my_bp_nav_items);

function my_bp_nav_items () {
// wp_list_pages('title_li=');
$class = is_page( BP_CUSTOM_PAGE_SLUG )? 'class="selected"' : '';
$url = get_bloginfo('url').'/blog/'.BP_CUSTOM_PAGE_SLUG;
?>
<li<?php echo $class; ?><a href="<?php echo $url; ?>"
title="<?php _e( 'Overview ', 'oc' ); ?>">
<?php _e( 'Overview', 'oc' ); ?>
</a></li>
<?php }

Skip to toolbar