How do you disable the admin-bar.css

This Should do the trick <?php function adminBar_dequeue() { wp_dequeue_style(‘admin-bar’); wp_deregister_style(‘admin-bar’); } add_action( ‘wp_enqueue_scripts’, ‘adminBar_dequeue’, 9999 ); add_action( ‘wp_head’, ‘adminBar_dequeue’, 9999 ); ?>

How to disable or customize admin bar in back-end

To disable (or in the case which I show below with code, hiding) the adminbar in the back-end you could use following code snippet. Please always backup functions.php before editing/adding code. I added also a capability so the adminbar is still visible for the admin. (which you can remove if wish by removing !current_user_can( ‘manage_options’ … Read more

Remove admin bar “My Sites” link from contributor roll

When you use register_post_type function, in the second parameter ($args) you can change some parameters. See the codex for more informations : https://codex.wordpress.org/Function_Reference/register_post_type#Parameters A good link is also : https://codex.wordpress.org/Roles_and_Capabilities#Capability_vs._Role_Table to get more information about default capabilites and roles Here is an example from the docs for “book” custom post type (add this in your … Read more

How to remove logged user profile href link

Try the below code, function remove_menuitems_from_admin_bar() { global $wp_admin_bar; $wp_admin_bar->remove_menu(‘wp-logo’); $wp_admin_bar->remove_menu(‘user-info’); $wp_admin_bar->remove_menu(‘site-name’); $wp_admin_bar->remove_menu(‘dashboard’); $wp_admin_bar->remove_menu(‘edit-profile’, ‘user-actions’); $wp_admin_bar->remove_menu(‘my-account’); $user_id = get_current_user_id(); $current_user = wp_get_current_user(); if (!$user_id) return; $avatar = get_avatar($user_id, 26); $howdy = sprintf(__(‘Howdy, %s’), ‘<span class=”display-name”>’ . $current_user->display_name . ‘</span>’); $class = empty($avatar) ? ” : ‘with-avatar’; $wp_admin_bar->add_menu(array( ‘id’ => ‘my-account’, ‘parent’ => ‘top-secondary’, ‘title’ => … Read more

Where is admin bar supposed to appear? [closed]

It’s supposed to be in the footer, and it’s positioned with CSS. This is partly because at the time that it was introduced there wasn’t a standard hook in themes for placing something at the very top of the page. Instead it is added to the wp_footer hook. It’s the theme’s job to make sure … Read more

What code removes the admin bar for all users in WordPress 3.3?

/* Front end */ show_admin_bar( false ); /* back end */ function disableAdminBar(){ remove_action( ‘admin_footer’, ‘wp_admin_bar_render’, 1000 ); function remove_admin_bar_style_backend() { echo ‘<style>body.admin-bar #wpcontent, body.admin-bar #adminmenu { padding-top: 0px !important; }</style>’; } add_filter(‘admin_head’,’remove_admin_bar_style_backend’); } add_action(‘init’, ‘disableAdminBar’); Modified version of http://wp.tutsplus.com/tutorials/how-to-disable-the-admin-bar-in-wordpress-3-3/