Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Removes the Yoast node from the WP Admin Bar.
<?php
/*
* Plugin Name: Remove Yoast Bar
* Plugin URI: https://www.nosegraze.com
* Description: Removes the Yoast node from the WP Admin Bar.
* Version: 1.0
* Author: Nose Graze
* Author URI: https://www.nosegraze.com
* License: GPL2
*
* @package remove-yoast-bar
* @copyright Copyright (c) 2016, Nose Graze Ltd.
* @license GPL2+
*/
/**
* Remove Yoast Node
*
* @param WP_Admin_Bar $wp_admin_bar
*
* @since 1.0
* @return void
*/
function remove_yoast_bar( $wp_admin_bar ) {
$wp_admin_bar->remove_node( 'wpseo-menu' );
}
add_action( 'admin_bar_menu', 'remove_yoast_bar', 99 );
@kelecz

This comment has been minimized.

Copy link

commented Jul 21, 2016

Hello there,
should I put it as file or code in function.php?
If most go as a file remove-yoast-bar.php where to place it?
Sorry and thx in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.