Skip to content

Instantly share code, notes, and snippets.

@DavidWells
Last active August 29, 2015 13:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DavidWells/8789882 to your computer and use it in GitHub Desktop.
Save DavidWells/8789882 to your computer and use it in GitHub Desktop.
Remove inbound now marketing admin bar for all but admin users. Add this snipper to your functions.php file
<?php
function remove_inbound_admin_bar() {
global $wp_admin_bar;
if ( is_user_logged_in() && !current_user_can( 'manage_options' )) {
$wp_admin_bar->remove_menu('inbound-admin-bar');
}
}
add_action( 'wp_before_admin_bar_render', 'remove_inbound_admin_bar' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment