Top Menu

WordPress Admin Bar Customization Without Using Plugins

Admin Toolbar or Admin Bar is a part of WordPress admin dashboard or front end which i personally don’t like much. Some of the options provided in the admin bar are already present in the sidebar menu. So it’s not a good idea to put same content to the dashboard twice.

Here is the complete list of code snippet which helps you to customize admin bar for you. Place the code in theme function file functions.php.

1. Completely Removing Admin Bar from Admin Dashboard Page

With Admin Bar WordPRess

Below code will disable the admin bar from admin dashboard. Copy and paste the code to your functions.php. Usually before the ?> in your function file.

//Completely Removes Admin Bar from Admin Page
remove_action( 'admin_footer', 'wp_admin_bar_render', 1000 ); // For admin page

// CSS override for the admin page
function remove_admin_bar_style_backend() {
echo '';


2. Completely Removing Admin Bar from Front End

With Admin Front End

Below code snippet removes admin bar/ toolbar from front end of your site.

//Completely Removes Admin Bar from Front End Site
remove_action( 'wp_footer', 'wp_admin_bar_render', 1000 ); // For front end

// CSS override for the frontend
function remove_admin_bar_style_frontend() {
echo '';
add_filter('wp_head','remove_admin_bar_style_frontend', 99);

without admin front end bar

Thanks to TutsPlus

3. Customizing Admin Bar Links One By One

Please modify according to your need and use the below code if you want to retain some of the links. Please go through each and every comments which explains you which link removes after inserting the line of code. Just comment out or delete the line if you want to retain the link in admin bar.

function blgs_rnb_remove_admin_bar() {
    global $wp_admin_bar;

	//Remove WordPress Logo Menu Items
    $wp_admin_bar->remove_menu('wp-logo'); // Completely Removes WP Logo, Below are the individual items
    $wp_admin_bar->remove_menu('about');   // 'About WordPress'
    $wp_admin_bar->remove_menu('wporg');   // ''
    $wp_admin_bar->remove_menu('documentation');  // 'Documentation'
    $wp_admin_bar->remove_menu('support-forums');  // 'Support Forums'
    $wp_admin_bar->remove_menu('feedback');       // 'Feedback'

    //Remove Site Name Items
	$wp_admin_bar->remove_menu('site-name'); // Completely Removes Site Name from Dashboar and Front End Admin Bar, Below are the individual items
	$wp_admin_bar->remove_menu('view-site'); // 'Visit Site'

	$wp_admin_bar->remove_menu('dashboard'); // 'Dashboard' Link, Only Front End
	$wp_admin_bar->remove_menu('themes'); // 'Themes' Link, Only Front End
	$wp_admin_bar->remove_menu('widgets'); // 'Widgets' Link, Only Front End
	$wp_admin_bar->remove_menu('menus'); // 'Menus' Link, Only Front End

	// Remove Comments Bubble

	//Remove Update Link if theme/plugin/core updates are available

	//Remove '+ New' Menu Items
	$wp_admin_bar->remove_menu('new-content'); // Completely Removes '+ New' from Dashboar and Front End Admin Bar, Below are the individual items
	$wp_admin_bar->remove_menu('new-post');   // 'Post' Link
	$wp_admin_bar->remove_menu('new-media');   // 'Media' Link
	$wp_admin_bar->remove_menu('new-link');   // 'Link' Link
	$wp_admin_bar->remove_menu('new-page');   // 'Page' Link
	$wp_admin_bar->remove_menu('new-user');   // 'User' Link

	// Remove 'Howdy, username' Menu Items
	$wp_admin_bar->remove_menu('my-account');  // Completely Removes 'Howdy, username' and Menu Items
	$wp_admin_bar->remove_menu('user-actions');  // Completely Removes Submenu Items Only
	$wp_admin_bar->remove_menu('user-info'); // 'username' which links to profile page
    $wp_admin_bar->remove_menu('edit-profile');  // 'Edit My Profile' Link
	$wp_admin_bar->remove_menu('logout');  // 'Log Out' Link

add_action( 'wp_before_admin_bar_render', 'blgs_rnb_remove_admin_bar' );

Best Items - Top e-Commerce WordPress Plugins

Find 61+ top notch e-Commerce WordPress plugins - Paypal, Jigoshop, Amazon, WooCommerce, Credit Card Gateway and Authorize etc.

Best Items - Best Restaurant WordPress Theme

Collection of best Premium restaurant WordPress themes ready to be used for your and client projects.

Best Items - Top notch Premium BuddyPress Themes

Are you looking for best premium WordPress themes which are BuddyPress ? Head over to Premium BuddyPress Themes for top quality and responsive designs.

Best Items - Best Gallery WordPress Plugins

Find most downloaded WordPress Gallery plugins - Video, Thumbnail and Photo Gallery etc...

Best Items - Collection of Best Premium Portfolio WordPress themes

Need to showcase your project work in a stunning way? These premium Portfolio WordPress themes will make your work easy for you. Perfect for showcasing Project, Photography, Video and Art work.

Best Items - Best WordPress Templates Made for Mobile and Tablet Visitors

Collection of Premium WordPress templates to take your website to the next level. Use these themes on your project to reach out Mobile and tablet users. Grow your business and traffic instantly.

Best Items - Ultimate Collection of Responsive WordPress Themes

Responsive WordPress themes enables stunning look and feel of your website in any device - from mobile devices to widescreen monitors. These collections are sorted by user rating and number of sales.

Best Items - 200+ Popular HTML Email and Newsletter Templates for Effective Marketing

Do you want to market your products effectively ? There are 200+ great collection of E-mail and Newsletter HTML templates from Themeforest. Get into site directly and search for the suitable template that boost your sales and conversion rate.

, , ,

  • Elaustralopithecus

    Hello, it works ! keep working and show us more trick