Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: How to add pages to the navigation?


alunsina
Participant

@alunsina

here’s something i have lying around. i’m not sure where i got it. not very good at records:

:D


<?php

function add_about_to_main_menu() {

$class = (bp_is_page(‘about’)) ? ‘ class=”selected” ‘ : ”;

echo ‘<li ‘ . $class. ‘>‘ . __( ‘About’, ‘buddypress’ ) .’‘;

}

add_action(‘bp_nav_items’,’add_about_to_main_menu’);

?>


end here.

create this as something like aboutmenu.php then edit the link (href part). this way you wont have to muck around the theme files.

hope that helped!

Skip to toolbar