Skip to content

Instantly share code, notes, and snippets.

@rickrduncan
Created February 7, 2014 11:47
Show Gist options
  • Save rickrduncan/8861323 to your computer and use it in GitHub Desktop.
Save rickrduncan/8861323 to your computer and use it in GitHub Desktop.
Remove 'SEO' from admin bar for users of WordPress SEO by Yoast. The code belongs in your functions.php file or better yet a functionality plugin.
<?php
//* Do NOT include the opening php tag
//* Remove the link 'SEO' from admin bar. It's placed there by the plugin WordPress SEO by Yoast.
add_action( 'wp_before_admin_bar_render', 'wlwp_admin_bar' );
function wlwp_admin_bar(){
global $wp_admin_bar;
$wp_admin_bar->remove_menu('wpseo-menu');
}
@braddalton
Copy link

Still works! Thank You.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment