An Unobstrusive ‘Dashboard’ Link

——  Posted on August 6, 2013  ——

WordPress Admin Bar Alternatives

About a month ago I came across a simple solution for an unobtrusive ‘edit’ link in WordPress. I’ve been rocking it for about month now, and can honestly say that I haven’t missed the big, grey WP Admin bar a bit. I just have one problem; I’ve found myself using the edit button to get to the WordPress Dashboard rather than to edit a specific article or page.

That doesn’t sit very well with my OCD, so I finally took a few minutes to add my spin to the concept which is simply adding a WordPress dashboard link to go along with the edit post link. Woo!



Place this code anywhere on your page, and then add the CSS below to your style sheet.

global $current_user;
if ($current_user->user_level == 10 )echo '<a href="/wp-admin/" title="Dashboard">Dashboard</a>';
else echo '';


a.dashboard-link {
    overflow: hidden;
    display: inline-block;
    text-indent: -99em;
    white-space: nowrap;
    height: 24px;
    width: 24px;
    position: fixed;
    top: 25px;
    left: 15px;
    z-index: 9999999;
    background-position: -59px -35px;
    background-image: url("../../../../wp-admin/images/menu.png");

Note: If you want to use this in addition to the ‘edit’ link, you will have to adjust the position of the edit button in your css.