How to Add a Shortcut to WordPress Admin Bar (with and without a Plugin)

Last updated on Aug 29, 2025

After logging in to the WordPress dashboard, you sometimes want to go to a certain page quickly. Adding a shortcut to the admin bar can be a great idea for this particular matter.

By adding a shortcut to the admin bar, you can go to a specific page within the WordPress dashboard with a single click. Save time.

In this post, I will show you how to add a shortcut to the WordPress admin bar. With and without a plugin.

Shortcuts ⤵️

When You Should Add a Shortcut to Admin Bar?

Some time ago, I created a paid campaign on Facebook to promote my funnel. I used Independent Analytics to monitor the traffic of the campaign.

By the way, Independent Analytics is an analytics plugin for WordPress that has a feature to monitor the traffic of a specific page and I used this feature to monitor the traffic of the funnel during the campaign.

The problem was that I needed to go to the Independent Analytics dashboard and clicked another menu item to access the custom report I created. So, I thought that creating a shortcut would be nice.

Shortcut example.

My case above is a perfect example of when you should create a custom shortcut to the admin bar.

Anytime you want to go to a specific page on your WordPress dashboard quickly, you can create a custom shortcut like I did.

Adding a Custom Shortcut to WordPress Admin Bar

As I mentioned in the opening section, I will show you how to add a custom shortcut to the WordPress admin bar using two methods: manually and using a plugin.

— Adding a Custom Shortcut to WordPress Admin Bar Manually

To add a custom shortcut to the WordPress admin bar manually, you need to add a custom function to your WordPress site.

To do so, you can either edit the functions.php file of your active theme or create a custom plugin dedicated to hosting custom functions. The latter option is more recommended if you have multiple custom functions on your site.

The code snippet you can use to add the custom function for this particular matter is:

function custom_shortcut ($wp_admin_bar) {
    $args = array(
	'id' => 'shortcut-id',
        'title' => 'Custom Shortcut', 
        'href' => 'URL' 
    );
    $wp_admin_bar->add_node($args);
}
add_action('admin_bar_menu', 'custom_shortcut', 999);

You can replace shortcut-id, Custom Shortcut, and URL with an ID, shortcut label, and the URL of the admin page you want to access with the shortcut.

When adding the shortcut ID, make sure to use a dash or underscore if you want to use an ID consisting of more than one word.

For example, in my case, I created a custom shortcut to access a custom report on Independent Analytics. So, code snippet is:

Example of final code

After implementing the code above, you should see a shortcut item on the admin bar of your WordPress site.

Custom shortcut

Now, the question is, how to implement the code?

Implementing the Code Snippet

As I mentioned above, to add a custom function in WordPress, you can edit the functions.php file of your active theme. Or, you can create a custom plugin designed specifically to host custom functions.

Let’s add the code snippet with the first method.

First, login to your WordPress dashboard and go to Appearance -> Theme File Editor on your WordPress dashboard.

Theme File Editor

💡 If you use a block theme, you can find Theme File Editor under the Tools menu. If you can’t find it, check the settings on your security plugin.

Click the functions.php file on the Theme Files panel to edit it. Add the code snippet above right after the last line of the file content and click the Update File button to update the file.

Code snippet implementation

That’s it. You should now see a new shortcut on your admin bar.

Please note that while adding a custom function by editing the functions.php file of the active is the easiest method, it is not a permanent solution.

Unless you use a child theme, your code may get overridden when you update your theme to a newer version.

For a permanent custom function addition, I strongly recommend you use a custom plugin. You can find the detailed instructions on this section.

Adding a Sub-menu Item to the Shortcut

You can use the code snippet above to add a shortcut consisting of one menu item.

What if you want to add a sub-menu item to the shortcut?

If so, you can edit the code above into the following:

function custom_shortcuts($wp_admin_bar) {
    $parent_args = array(
        'id'    => 'shortcut-id-one',
        'title' => 'Custom Shortcut',
        'href'  => 'URL'
    );
    $wp_admin_bar->add_node($parent_args);

    // Define the first sub-menu item (Custom Report)

    $custom_shortcut_two_args = array(
        'parent' => 'shortcut-id-one',
        'id'     => 'shortcut-id-two',
        'title'  => 'Custom Shortcut Two',
        'href'   => '#'
    );
    $wp_admin_bar->add_node($custom_shortcut_two_args);
}
add_action('admin_bar_menu', 'custom_shortcuts', 999);

To add more sub-menu items, you can copy the following block and paste it before the closing curly bracket.

Sub menu item block

Just make sure to tailor the ID, title and URL.

— Adding a Custom Shortcut to WordPress Admin Bar with a Plugin

If adding a custom shortcut to the admin bar via custom function looks scary for you, then you can do it using a plugin.

A plugin that you can use for this case is WP Custom Admin Interface.

Simply install the plugin and activate it. If you are new to WordPress, you can read our post about how to install a new plugin in WordPress.

After installing and activating the plugin, you can go to Custom Admin Interface -> Admin Toolbar on your WordPress dashboard.

Admin Toolbar

Add a new menu item to the admin bar by clicking the Add menu item button.

Adding a new menu item

Click the pencil icon to give your menu item a label and click the chain icon to add a link.

Adding menu label and link

Next, scroll down to the bottom section. Select Everyone on the Implement this for option. Click the Save All Settings button to apply the changes.

Custom shortcut implementation

A little note. When you add a new item to the admin bar, WP Custom Admin Interface will place it at the leftmost.

Newly added menu item

To move it, you can simply drag it downward. In WP Custom Admin Interface, top means left and bottom means right.

If you want to add a sub-menu item to your shortcut, you can simply add a new menu item and then place it below the first menu item you have just created above (the parent menu item).

To do so, you can simply drag the sub-menu item to the parent menu item. Pretty similar to the WordPress’ native menu editor.

Reorder menu items

You can also use the drag-and-drop feature offered by the plugin to re-order the menu items on the admin bar.

If you want to get the default admin bar back, you can click Restore to default WordPress Toolbar button. Just be careful when clicking this button because it will also delete the custom menu items you have created.

Restore the default toolbar

📝 Summary

Adding a shortcut to the admin bar can be a great idea if you want to go to a specific page within the dashboard more quickly.

The perk of adding a shortcut to the admin bar is that you can access it from nearly all pages because the admin bar is visible nearly everywhere within the WordPress dashboard.

There are two options you can choose to add a custom shortcut to the admin bar: manually and using a plugin.

The manual method is great if you want to keep your WordPress installation minimalist. The plugin method, on the other hand, makes more sense if you don’t want to deal with code.

WP Custom Admin Interface is the plugin that you can use to add a custom shortcut to the WordPress admin bar.

This page may contain affiliate links, which help support the project. Read our affiliate disclosure.

Aliko Sunawang

Aliko is a professional blogger and web creator. He has been blogging with WordPress since 2013. In his spare time, he loves going out to take some photos. More

Got WP knowledge?

Why not turn it into recurring revenue?

suggested posts

Documenting WordPress

How to Turn Your WordPress Knowledge Into Revenue

If you have knowledge on WordPress, then you can make money working on your own terms…

Dollar

How to Build MRR with Your WordPress Blog

If you have a WordPress blog, you can turn it into a monthly money-printing machine by simply…

Do you have WordPress knowledge?

You can turn it into recurring revenue by just sharing it.