How can I specify the position of an admin bar item added with $wp_admin_bar->add_menu() or add_node()?

If I am correct these are the default positions: wp_admin_bar_wp_menu – 10 wp_admin_bar_my_sites_menu – 20 wp_admin_bar_site_menu – 30 wp_admin_bar_updates_menu – 40 wp_admin_bar_comments_menu – 60 wp_admin_bar_new_content_menu – 70 wp_admin_bar_edit_menu – 80 small code snippet from what I use: add_action(‘admin_bar_menu’, ‘your_function_name’, 10); The 10 should bring it to the most left side in the adminbar. At moment … Read more

Disable the admin bar

You need to specify the order or number which signifies when the Hook gets fired. In this case I beleive it’s 0 and the filter is: wp_admin_bar_render. The action to remove the function I believe is: remove_action( ‘in_admin_header’, ‘wp_admin_bar_render’, 0); The Function Reference: Function Reference/remove action And here it is in the core file: WordPress … Read more

WP admin bar disappeared

Might be one of 3 things (since you verified a wp_footer) you set it to not show in your user profile a plugin you installed has a Confliction with it you created a php / js code which produces errors in your wp_footer Course of action: 1. Check you personal user profile backend to see … Read more

WordPress Admin Bar Moving Links

Unset Here’s an example of how to unset the comments link if the default status is ‘closed’ (offers 2 different approaches). /** * Disable ‘Comments’ link if default status is _closed_ */ function remove_comments() { $default_comment_status = get_option( ‘default_comment_status’ ); if ( $default_comment_status == ‘closed’ ) { remove_action( ‘admin_bar_menu’, ‘wp_admin_bar_comments_menu’, 50 ); // optional solution … Read more