Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: How to add new top buttons ??


Erwin Gerrits
Participant

@egerrits

All you have to do is create a php file called “add_forum_to_menu.php” with the following code:

<?php
function add_forums_to_main_menu() {

$class = (bp_is_page('forums')) ? ' class="selected" ' : '';

echo '<li ' . $class. '><a href="' . get_option('home') . '/forums"
title="' . __( 'Forums', 'buddypress' ) .'">' .
__( 'Forums', 'buddypress' ) .'</a></li>';

}

add_action('bp_nav_items','add_forums_to_main_menu');
?>

and put it in the mu-plugins directory. Make sure the “/forums” path in the above code points to your forum directory (mine is at http://www.domain.com/forums)

Skip to toolbar