Customize WordPress admin-bar

There is no setting of putting the admin function vertically but if its a nuisance you can choose to not to display it by adding this filter to your functions.php file. The admin bar will be hidden in the frontpage but will be visible in the dashboard add_filter(‘show_admin_bar’, ‘__return_false’); When you are working you can … Read more

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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)