Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Hide the main navigation from non-logged in users?????


maburker
Participant

@maburker

We have decided to move all of the navigation to the admin bar. We are working on adding the following code to the bp-core-admin.php.

//*********Help*********//

function my_help_link(){

?>

Help

<ul class=”your-ul-list-css-classname”>

Help 1

<li class=”alt”>Help 2

Help 3

<li class=”alt”>Help 4

Help 5

<?php

}

add_action( ‘bp_adminbar_menus’, ‘my_help_link’, 3 );

The above code is an example from this site. However when we try to add the below code into the above code we get errors.

if (is_user_logged_in()) {

// Do stuff

} else {

// Do other stuff

}

So we need to figure out how to properly write the code. Then we can move all main navigation links to the admin bar bu using the same function. I’ll keep working until I get it right. It just makes better sense to keep all links in one area.

Skip to toolbar