[resolved] Admin Bar Function – Bp Root not Network Home- PHP
-
For a BuddyPress Site I have a function for putting “Groups”, or other menu items in the wp-admin bar.
This is it
function bcustom_adminbar_menu() { global $wp_admin_bar; if ( !is_user_logged_in() ) { return; } $wp_admin_bar->add_menu( array( 'id' => 'bcustom_menu', 'title' => __( 'Groups' ), 'href' => network_home_url('/groups/') ) ); } add_action( 'admin_bar_menu', 'bcustom_adminbar_menu', 15 );
However if the bp root blog is not the network home then the function is incorrect.
Could somebody please help me to change the line
'href' => network_home_url('/groups/')
so that it goes to or is equivalent to
<a href="/groups/">Groups</a>
Thanks.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘[resolved] Admin Bar Function – Bp Root not Network Home- PHP’ is closed to new replies.