• i quite enjoy the admin bar, but would love to make changes to it. i’ve seen a number of threads detailing how to remove it (for those that don’t know, it can be done through code or plugins to do so universally, or revealing that users can do so individually in their profile)

    however, i’d simply like to make changes to it. add and/or remove options for different user levels. maybe throw some styling in there. is this capable yet, and i’m just missing the option? or a “in the future” thing?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter drkknght

    (@drkknght)

    you win this round, wordpress.

    …this round…

    I’d love to be able to add/remove menu items to that bar also.

    Edit : All hail to Google and the WP community
    http://sumtips.com/2011/03/customize-wordpress-admin-bar.html

    Hi. I’m trying to customize two things:

    1. Add a small logo to the top left of the admin bar.
    2. The site (“Visit Site”) menu item to open in a new window.

    Is this possible?

    erick_paper,

    To edit logo at top left corner:
    Requires WordPress to be installed on your own server (not wordpress.com)

    • Access the following… /wp-includes/images/admin-bar-sprite.png and open it with your favorite photo editor.
    • DO NOT CHANGE THE DIMENSIONS OF THIS FILE! It will mess things up due to the way wordpress uses this image. (Google “CSS Sprites” to learn how it works.)
    • Replace the two WordPress “W“s with your desired image. Again, Do not resize the sprite image! Just mask out the Ws and put your logo or whatever in its place. Keep your image in the exact 20px x 20px region the W occupied…
    • Be sure to save the .png with transparency (same as original)
    • Upload the image you have saved back onto your server and you are done.

    As for modding the other stuff on their, I’m workiing on it. Will post here when I get it down.

    All of the Admin Bar coding is located in the /wp-includes/admin-bar.php file.

    Be sure to save a copy of this file before changing things (Just in case). As with all PHP files, small typos can cause the whole thing to bug-out.

    It doesn’t hurt to have a basic understanding of PHP when you attempt to edit this stuff… Let me know if anyone has any questions. Peace

    DerekMX271, modifying core WP files to do some simple tweaking is generally a bad idea (some discussion on the matter here). Any change you do on those files will be overwritten on the next WP update you do. Your tweaks should be done either in functions.php inside your theme files, or with help of a plugin.

    To change the amdin logo you can simply create a plugin that loads additional CSS styles, like this :

    <?php
    /*
    Plugin Name: Custom admin styles
    Plugin URI: www.mywebsite.com
    Description: Custom CSS styles for admin interface.
    Author: John Doe
    Version: 0.1
    Author URI: www.johndoe.com
    */
    
    function add_custom_admin_styles() {
    	echo '<style>#header-logo { background-image: url('path/to/my/image.png')!important; }</style>';
    
    }
    
    add_action('admin_head', 'add_custom_admin_styles');
    
    ?>

    You can then add / modify any styles of the WP admin.

    Agreed mike… Thank you for the correction. And thank you for the plugin. Very handy!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘customize the admin bar?’ is closed to new replies.