skip to Main Content
Menu

WP Admin Bar fixes

Fix admin bar prior to delivery to client by inserting the following code to the function.php of client’s wordpress website installation.wp-admin-bar

add_action( 'admin_bar_menu', 'remove_admin_bar_items', 999 );

function remove_admin_bar_items( $wp_admin_bar )
{
$current_user = wp_get_current_user();
$loggedinuser=$current_user->user_login;
if (($loggedinuser==”admin”) || ($loggedinuser==”marketing”) || ($loggedinuser==”mis”))
{
$wp_admin_bar->remove_node( ‘wp-logo’ );
$wp_admin_bar->remove_node( ‘comments’ );
$wp_admin_bar->remove_node( ‘new-etn_menu’ );wp-admin-bar1” alt=”wp-admin-bar1″ width=”300″ height=”182″ class=”alignleft size-medium wp-image-2237″ />

}else{
$wp_admin_bar->remove_node( ‘wp-logo’ );
$wp_admin_bar->remove_node( ‘comments’ );
$wp_admin_bar->remove_node( ‘new-content’ );
}

}

resource: http://churchm.ag/remove-menu-items-from-wordpress-3-3-admin-bar/

Alphonse

Editorial Staff at ETN Multimedia is led by Alphonse Tan. Page maintained by Alphonse Tan

Back To Top