Do you want to make your WordPress toolbar more useful? Adding custom shortcut links can help. This guide will show you how to do it. It’s easy and quick. Let’s get started.
Why Add Custom Shortcut Links?
WordPress toolbar is very helpful. It gives you quick access to important functions. But, it can be better. Adding custom links to the toolbar saves time. You can jump to important pages fast.
Things You Will Need
- A WordPress website
- Admin access to your WordPress site
- Basic knowledge of WordPress
Steps to Add Custom Shortcut Links
Follow these steps to add custom shortcut links to the WordPress toolbar:
Step 1: Log Into Your WordPress Dashboard
First, log into your WordPress dashboard. You need admin access to do this. Once logged in, you can start adding custom links.
Step 2: Add Code To Your Theme’s Functions.php File
You need to add a small code snippet to your theme’s functions.php file. This file controls many aspects of your theme.
Follow these steps:
- Go to Appearance in the left sidebar.
- Click on Theme Editor.
- Select the functions.php file from the right sidebar.
- Add the following code to the end of the file:
function add_custom_toolbar_link($wp_admin_bar) {
$args = array(
'id' => 'my_custom_link',
'title' => 'My Custom Link',
'href' => 'http://example.com',
'meta' => array(
'class' => 'my-custom-link-class',
'title' => 'Visit My Custom Link'
)
);
$wp_admin_bar->add_node($args);
}
add_action('admin_bar_menu', 'add_custom_toolbar_link', 999);
This code adds a new link to your toolbar. Replace ‘http://example.com’ with your custom link. Change ‘My Custom Link’ to your desired title.
Step 3: Save The Changes
After adding the code, click on the Update File button. This saves your changes. Now, your custom link should appear in the toolbar.
More Customization Options
You can add more custom links by repeating the process. Just change the ‘id’, ‘title’, and ‘href’ values in the code. You can also group your links under a parent item.
Adding A Parent Item
To add a parent item, use this code:
function add_custom_parent_link($wp_admin_bar) {
$args = array(
'id' => 'my_custom_parent',
'title' => 'My Custom Parent',
'href' => '#',
'meta' => array(
'class' => 'my-custom-parent-class',
'title' => 'My Custom Parent'
)
);
$wp_admin_bar->add_node($args);
}
add_action('admin_bar_menu', 'add_custom_parent_link', 999);
Now, add child items under this parent item:
function add_custom_child_link($wp_admin_bar) {
$parent = 'my_custom_parent';
$args = array(
'id' => 'my_custom_child_link',
'parent' => $parent,
'title' => 'My Custom Child Link',
'href' => 'http://example.com',
'meta' => array(
'class' => 'my-custom-child-link-class',
'title' => 'Visit My Custom Child Link'
)
);
$wp_admin_bar->add_node($args);
}
add_action('admin_bar_menu', 'add_custom_child_link', 999);
This code adds a child link under the parent item. Replace the ‘http://example.com’ and ‘My Custom Child Link’ with your values.
Using Plugins
If you don’t want to edit code, use plugins. Plugins make it easy to add custom links. Here are some popular plugins:
Admin Bar Tools
This plugin lets you add custom links to the toolbar. It’s easy to use. Install and activate the plugin. Then, go to Settings > Admin Bar Tools to add your links.
Wp Custom Admin Bar
This plugin offers more options. You can add links, menus, and more. Install and activate the plugin. Then, go to Settings > WP Custom Admin Bar to start customizing.

Credit: www.greengeeks.com

Credit: www.wpbeginner.com
Frequently Asked Questions
How Do I Add Custom Links To The WordPress Toolbar?
To add custom links, use a plugin or edit your theme’s functions. php file.
Which Plugin Is Best For Custom Toolbar Links?
The “Admin Menu Editor” plugin is popular and easy to use for adding custom links.
Can I Add Shortcut Links Without A Plugin?
Yes, you can add shortcut links by editing the functions. php file in your theme.
Is It Safe To Edit The Functions.php File?
Editing functions. php is safe if done carefully. Always back up your site first.
Conclusion
Adding custom shortcut links to your WordPress toolbar is very helpful. It saves you time and makes your work easier. Follow the steps in this guide, and you’ll have custom links in no time. Happy blogging!