The WordPress admin bar is a handy toolbar that appears at the top of your dashboard and frontend when logged in. By default, it includes links to the dashboard, updates, and user profile settings.
But what if you want to add a link to WordPress admin bar for quick access to an external site, a settings page, or a custom tool?
There are two main ways to do this:
1. The easy, no-code way – using a plugin like Admin Bar Editor to add links in just a few clicks.
2. The manual method – adding custom code to your theme’s functions.php file.
In this guide, we’ll cover both methods so you can choose the one that works best for you. If you want a quick, risk-free solution, Admin Bar Editor is the best option. Let’s get started!
Method 1: Add a Link to WordPress Admin Bar Using Admin Bar Editor (No Code Required)
The easiest way to add a link to the WordPress admin bar is by using Admin Bar Editor.
This method requires no coding and allows you to add custom links in just a few clicks.
You can set the link’s title, icon, and visibility settings without modifying your theme files.
Why Use Admin Bar Editor?
✅ No coding required – perfect for beginners.
✅ Custom link options – add a title, URL, and icon.
✅ Role-based visibility – show or hide links for specific user roles.
✅ Easy submenu management – add child links under your custom link (up to 3 children).
✅ Free version available.

Complete Customization Freedom on The Admin Bar
Create unique frontend and backend admin bars for bespoke User experiences with the Admin bar editor.
Step-by-Step Guide on how to Add a Link to WordPress Admin Bar
1. Install and Activate Admin Bar Editor
Go to your WordPress dashboard.
Navigate to Plugins > Add New and search for Admin Bar Editor.

Click Install Now, then Activate the plugin.
PRO TIP: Use the WP Spotlights plugin to install and activate plugins without navigating multiple menus or page loads. Work 10 times faster with this productivity booster plugin.

Fastest WordPress Navigation & Management tool!
Search and Manage Users, plugins, themes etc all from one search bar with WP Spotlight.
2. Open the Admin Bar Editor Settings
Go to Admin Bar Editor in your WordPress dashboard.
3. Pick the location and then add a new link
Pick between the Front-end or back-end admin bar. With the Admin Bar Editor, you can add custom links to both your front-end and back-end admin bar.

Pick between the front and the back end admin bar and click “Add Item”.

Add a link to the new item along with an item name and custom icon. You can add normal icons, dash icons or even upload your custom icons.

4. Set Visibility and Placement
Choose who can see the link (all users or specific roles).

For the front-end admin bar, you can also choose to hide the admin bar for all users, guest users or even set manual visibility conditions based on user role or name.

To control the placement of your link, add itn directly to the admin bar or create a submenu item under an existing menu. For example, you want to add a custom link for your WooCommerce settings on your admin bar and then add another custom link under that menu for Orders and then another custom link inside it for Coupons.
You can do that easily in under a minute with the Admin Bar Editor.

This is how your menu will look on the admin bar.

You can add up to 3 child menus for each menu item so curate menus and add links exactly how you need them.
There are also extensive styling options available to tweak the look and feel of your admin bar as well as its position on your dashboard(Top or bottom).
So it goes without saying if you need a hassle-free powerful customizer for your admin bar, the Admin Bar Editor is the only tool you’ll ever need. It lets you quickly add important shortcuts to your admin bar and improve navigation without touching any code.
Next, let’s look at the manual method for adding links using code (recommended for developers).
Method 2: Add a Link to WordPress Admin Bar with Custom Code (For Developers)
If you prefer a manual approach, you can add a link to the WordPress admin bar by modifying your theme’s functions.php file.
This method gives you full control but requires some coding knowledge. A small mistake in the file can break your site, so proceed with caution.
How It Works
WordPress provides the admin_bar_menu hook, which allows developers to add custom items to the admin bar. We’ll use this hook to insert a new link.
Step-by-Step Guide to Adding a Link Manually
Open Your Theme’s functions.php File
In your WordPress dashboard, go to Appearance > Theme Editor.
Locate and open the functions.php file.
(Alternatively, you can access this file via FTP or your hosting file manager.)
Insert the Following Code
Add this PHP snippet at the bottom of your functions.php file:
function custom_admin_bar_link($wp_admin_bar) {
// Define the link
$args = array(
'id' => 'custom_link',
'title' => 'Google', // Change this to your preferred title
'href' => 'https://google.com', // Change to your desired URL
'meta' => array(
'target' => '_blank', // Opens the link in a new tab
'class' => 'custom-admin-bar-link'
)
);
// Add the link to the admin bar
$wp_admin_bar->add_node($args);
}
add_action('admin_bar_menu', 'custom_admin_bar_link', 100);
Just save your changes and reload your dashboard.
This is what the admin bar should look like with the new ‘Google’ link:

Optional: Add an Icon to Your Link
If you want to add an icon next to your custom link, you’ll need to include some CSS.
Add the following to your Additional CSS section (Appearance > Customize > Additional CSS) (Only works for classic themes):
.custom-admin-bar-link .ab-item:before {
content: "\f158"; /* Dashicon code */
font-family: dashicons;
padding-right: 5px;
}
You can replace \f158 with a different Dashicon code from the WordPress Dashicons library.
This is what it should look like:

Things to Keep in Mind
- Editing functions.php affects your active theme only. If you change themes, you’ll need to re-add the code.
- A small syntax error can break your site, so back up your file before editing.
- If you want a safer, no-code method, the Admin Bar Editor plugin allows you to add links without modifying files.
If you're comfortable with code, this method works well. However, for an easier, risk-free solution, Admin Bar Editor is the better option—especially if you need to add multiple links or customize visibility settings.
Bonus: How to Remove or Hide Links from the Admin Bar
Sometimes, instead of adding links, you might want to remove or hide certain admin bar items. This is useful if you want to declutter the toolbar or restrict access to specific menu items for certain users.
As we’ve seen, with the Admin Bar Editor you can control the visibility of every single item on the admin bar based on user roles such as subscribers or direct user names but you can also completely remove or hide certain items from the admin bar for both the front and back end and it’s as simple as toggling a setting.
Just go to any item on the admin bar item on the Admin Bar Editor and toggle the item by enabling or disabling the button.

This is the fastest, safest way to clean up the admin bar without touching any code.
Final Thoughts
If you're looking for a quick and flexible way to add a link to WordPress admin bar, add, remove or manage admin bar links, Admin Bar Editor is the best choice. It allows you to disable, hide, or reorganize menu items without coding.
But if you prefer a developer-friendly solution, using the functions.php method works just as well.
With these methods, you can fully control which links appear in the WordPress admin bar, keeping it clean and functional.
