Home / Tutorials / How to Remove items from WordPress Admin Bar

How to Remove items from WordPress Admin Bar

WordPress have functions to remove items from top amdin bar:

This function removes an item from the Toolbar. Toolbar items are also called “nodes”.

Tthis function calls above function $wp-admin_bar->remove_node($id);

The Toolbar replaces the Admin Bar since WordPress Version 3.3.

note: This function is a method of the WP_Admin_Bar class and $wp_admin_bar global object, which may not exist except during the ‘admin_bar_menu’ or ‘wp_before_admin_bar_render’ hooks.

Finding Toolbar/Admin Bar Node ID

The node ID’s can be found in the HTML source code of any WordPress page with a Toolbar on it. Find the list items that have ID’s that start with “wp-admin-bar-“. For example, the list item ID for the WordPress Logo on the left in the Toolbar is “wp-admin-bar-wp-logo”:

Remove “wp-admin-bar-” from the list item ID to get the node ID. From this example the node ID is “wp-logo”.

Example – remove log item from admin bar:

 

About cmadmin

Web Developer & Designer | Android App Developer

Check Also

wp-online-shop

7 Best Free WordPress Ecommerce Plug-ins

WordPress can be used as a robust solution for building eCommerce sites. The powerful plug-in …

wp fast light

Make WordPress Website Lightning Fast

Slow loading times could be killing your website. That might sound a bit dramatic, but …

Login


Username
Create an Account!
Password
Forgot Password? (close)

Sign Up


Username
Email
Password
Confirm Password
Want to Login? (close)

Forget Password?


Username or Email
(close)
SHARE
OR
SUBSCRIBE
To get latest new / tutorial / technology / development information subscribe with us.
ARE YOU READY? GET IT NOW!
Lets Get Updated with latest trends & tutorials!
Your Information will never be shared with any third party.
Ready for latest tutorials & tools !
OR SUBSCRIBE WITH