Adding links and styling admin bar
-
I want to add links and position some of these to the right side of the admin bar and some to the left.
I want these links to appear when users are logged out and logged in. So far this is what I have. This is added to my theme’s function.php file. This adds the login and search to the admin bar for logged out users. I would like to add additional internal and external links like Email, network site home page, and a dropdown list of all network sites. Is it possible for this admin bar be displayed across all network sites? Do do this what files should I be working with and where in the code below would I add the links? And what would the syntax be?
//Always show the admin bar function OXP_login_adminbar( $wp_admin_bar) { if ( !is_user_logged_in() ) $wp_admin_bar->add_menu( array( 'title' => __( 'Log In' ), 'href' => wp_login_url() ) ); } add_action( 'admin_bar_menu', 'OXP_login_adminbar' ); add_filter( 'show_admin_bar', '__return_true' , 1000 );
- The topic ‘Adding links and styling admin bar’ is closed to new replies.