Skip to content

Instantly share code, notes, and snippets.

@Abd-Ur-Rehman
Last active January 10, 2017 21:52
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 Abd-Ur-Rehman/c78967e364ddcce1030840ef0f5d5fa3 to your computer and use it in GitHub Desktop.
Save Abd-Ur-Rehman/c78967e364ddcce1030840ef0f5d5fa3 to your computer and use it in GitHub Desktop.
// Disabling admin bar for non admin users (this would work on a non-Woo site...)
function abdurrehman_net_hide_admin_bar_if( $show ) {
if ( /* CONDITION */ ) $show = false;
return $show;
}
add_filter( 'show_admin_bar', 'abdurrehman_net_hide_admin_bar_if' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment