Nav bar at top of premium.wpmudev.org

How do you guys do the top nav bar on this site? It looks like you customized the standard WordPress login bar. Is there a plugin for this?

I would very much like something similar to that or what is seen at Thrillist.com. Any suggestions please?

  • MyMiddleEarth

    We have also done this over at mymiddleearth.com

    It is indeed the standard WP Admin Bar (Unless of course the WPMUDev coder wizards are more cunning than I realized!)

    There are a few plugins which can help with this.

    BUT if you are running a Multisite network, none of them work properly and you must hand code the entire bar =\

    It IS do-able though!

    Try this plugin (if NOT running Multisite)

    http://wordpress.org/extend/plugins/wordpress-admin-bar-improved/

    If this won't work for you due to Multisite, you have to manually create a plugin that controls your entire nav bar.

    I will enclose the one I created for MyMiddleEarth.com below... I realize the code is sloppy and probably not ideal, but it DOES work :slight_smile:

    <?php
    /*
    Plugin Name: MyMiddle-earth Admin-Bar
    Plugin URI: http://www.mymiddleearth.com
    Description: Add links to the Wordpress Admin Bar
    Author: mymiddleearth.com admins
    Version: 3.1
    Author URL: http://www.mymiddleearth.com
    */
    
    function admin_bar_create_blog_link(){
         global $wp_admin_bar;
         $create=get_site_url( BP_ROOT_BLOG ).'/network-tracker/create/';
         $wp_admin_bar->add_node( array(
              'parent' => 'my-sites',
              'title' => 'Create a new site',
              'href' => $create) );
    }
    add_action('wp_before_admin_bar_render','admin_bar_create_blog_link');
    
    function admin_bar_create_mymenet_account_link(){
         global $wp_admin_bar;
         $acctlink=get_site_url( BP_ROOT_BLOG ).'/account';
         $wp_admin_bar->add_node( array(
              //'parent' => 'my-sites',
    		  'id' => 'my-account',
              'title' => 'My Account',
              'href' => $acctlink) );
    }
    add_action('wp_before_admin_bar_render','admin_bar_create_mymenet_account_link');
    
    function admin_bar_create_mymenet_settings_link(){
         global $wp_admin_bar;
         $settingslink=get_site_url( BP_ROOT_BLOG ).'/wp-admin/profile.php';
         $wp_admin_bar->add_node( array(
              'parent' => 'my-account',
              'title' => 'Edit My Settings',
              'href' => $settingslink) );
    }
    add_action('wp_before_admin_bar_render','admin_bar_create_mymenet_settings_link');
    
    function mymenet_wp_admin_bar() {
        global $wp_admin_bar, $wpdb;
    
    //Top Level bars
    	$mymiddle_earth_store = ' ';
            $middle_earth_network_sites = ' ';
    	$featured_partners = ' ';
    
        $wp_admin_bar->add_menu( array( 'id' => 'mymiddle_earth_store', 'title' => __( 'MyMiddle-earth Store', 'textdomain' ), 'href' => 'http://store.mymiddleearth.com' ) );
    
    		$wp_admin_bar->add_menu( array( 'parent' => 'mymiddle_earth_store', 'title' => __( 'Featured Product "Seer: A Wizards Journal by Jef Murray"', 'textdomain' ), 'href' => 'http://store.mymiddleearth.com/store/products/seer-a-wizards-journal-by-jef-murray/' ) ); 	
    
    	$wp_admin_bar->add_menu( array( 'id' => 'middle_earth_network_sites', 'title' => __( 'Middle-earth Network Sites', 'textdomain' ), 'href' => FALSE ) );
    
    		$wp_admin_bar->add_menu( array( 'parent' => 'middle_earth_network_sites', 'title' => 'Middle-earth News', 'href' => 'http://news.mymiddleearth.com' ) );
    
    		$wp_admin_bar->add_menu( array( 'parent' => 'middle_earth_network_sites', 'title' => 'Middle-earth Radio', 'href' => 'http://radio.mymiddleearth.com' ) );
    
    		$wp_admin_bar->add_menu( array( 'id' => 'swordsong', 'parent' => 'middle_earth_network_sites', 'title' => 'SwordSong Records', 'href' => 'http://swordsong.mymiddleearth.com' ) );
    
    			$wp_admin_bar->add_menu( array( 'parent' => 'swordsong', 'title' => 'My Little-earth', 'href' => 'http://mle.mymiddleearth.com' ) );
    
    			$wp_admin_bar->add_menu( array( 'parent' => 'swordsong', 'title' => 'Lonely Mountain Band', 'href' => 'http://lonelymountainband.mymiddleearth.com' ) );
    
    			$wp_admin_bar->add_menu( array( 'parent' => 'swordsong', 'title' => 'KING KELTIC', 'href' => 'http://kingkeltic.mymiddleearth.com' ) );
    
    		$wp_admin_bar->add_menu( array( 'parent' => 'middle_earth_network_sites', 'title' => __( 'Oloris Publishing', 'textdomain' ), 'href' => 'http://olorispublishing.mymiddleearth.com' ) );
    
    		$wp_admin_bar->add_menu( array( 'parent' => 'middle_earth_network_sites', 'title' => __( 'A Long Expected Journey', 'textdomain' ), 'href' => 'http://longexpectedjourney.mymiddleearth.com/' ) );
    
    		$wp_admin_bar->add_menu( array( 'parent' => 'middle_earth_network_sites', 'title' => 'Middle-earth Network LLC', 'href' => 'http://network.mymiddleearth.com' ) );
    
    		$wp_admin_bar->add_menu( array( 'parent' => 'middle_earth_network_sites', 'title' => 'Community Site Directory', 'href' => 'http://www.mymiddleearth.com/network-tracker/' ) );
    
    	$wp_admin_bar->add_menu( array( 'id' => 'featured_partners', 'title' => __( 'Featured Partners', 'textdomain' ), 'href' => FALSE ) );
    
    		$wp_admin_bar->add_menu( array( 'parent' => 'featured_partners', 'title' => __( 'Casual Stroll to Mordor', 'textdomain' ), 'href' => 'http://cstm.mymiddleearth.com' ) );
    
    		$wp_admin_bar->add_menu( array( 'parent' => 'featured_partners', 'title' => __( 'Quest Gaming Network', 'textdomain' ), 'href' => 'http://questgamingnetwork.mymiddleearth.com' ) );
    
    		$wp_admin_bar->add_menu( array( 'parent' => 'featured_partners', 'title' => __( 'NarniaFans.com', 'textdomain' ), 'href' => 'http://narniafans.com' ) );
    
    		$wp_admin_bar->add_menu( array( 'parent' => 'featured_partners', 'title' => __( 'Middle-earth Minutes', 'textdomain' ), 'href' => 'http://middleearthminutes.mymiddleearth.com' ) );
    
    		$wp_admin_bar->add_menu( array( 'parent' => 'featured_partners', 'title' => __( 'Grail Quest Books', 'textdomain' ), 'href' => 'http://grailquestbooks.mymiddleearth.com' ) );
    
    ?>
    
    <?php
    }
    //Call The Function Above
    add_action( 'admin_bar_menu', 'mymenet_wp_admin_bar', 1000 );
    
    ?>
  • aecnu

    Greetings warpedmind and MyMiddleEarth,

    @MyMiddleEarth thank you for the code and for trying to help another member. Some rep points sent your way!

    @warpedmind I was personally using Dashboard Tweaks plugin for my custom admin bar though that does not force the user to the front end of the site, it does allow for customization.

    If memory serves me well WPMU Dev is using the Custom Admin Bar plugin

    I am also considering WordPress Admin Bar Improved plugin

    Thank you both for being WPMU Dev Members!

    Cheers, Joe

  • MyMiddleEarth

    You're very welcome!

    My custom code is very much a temporary solution until I can get my hands on a truly "Complete" solution via a plugin.

    The thing with the WPMUDev Custom Admin Plugin is this:

    While it's REALLY neat, and can give you a great logo branding on that top left hand menu, it does not have any ability to add additional "Top level" menu's to the right of it.

    (Example: Here on WPMUDev.org they have "Community" "Ask a Question" etc)

    *THAT* was the specific function I was looking to create, and used this plugin as a temporary fix :slight_smile:

    Hope this helps!

  • Troy

    I was looking for the same thing myself, and I found an easy way to get this done.

    in /wp-includes/admin-bar.php you can add the following code to setup your custom code, I recommend using Ultimate Branding with this modification.

    /**
     * Add the WordPress logo menu.
     *
     * @since 3.3.0
     */
    function wp_admin_bar_wp_menu( $wp_admin_bar ) {
    	$wp_admin_bar->add_menu( array(
                    'id' => 'change this for your parent tag(Exmaple: my_links)',
                    'title' => __( 'What you want the display text to say',
                    'textdomain' ),
                    //the following can be left out to allow sub-domains
                    'href=> 'http://yourdesiredurl.com(this'
            ) );
            //This is for a submenu
            $wp_admin_bar->add_menu( array(
                    'parent' => 'this calls on the ID you set up for your button(Example: my_links',
                    'title' => __( 'What you want the display text to say',
                    'textdomain' ),
                    'href' => 'http://yourdesiredurl.com'
            ) );

    Example here TechandGamingNews.com
    If you run into any issues feel free to contact me and I will help out.

    Cheers.
    Dalton Dooly.

  • aecnu

    Greetings cstoudt,

    Thank you for the great question and though I do not know of a plugin that will do this to such a degree as we would like here in this thread, this may be of some help to you:
    http://technerdia.com/1140_wordpress-admin-bar.html

    In any event it all involves custom coding to some degree to get this level of customization.

    Alternatively you could see if there's a developer available at wpmu jobs who could get onto it right this minute

    Thank you for being a WPMU DEV Community Member!

    Cheers, Joe

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.