Hiding multiple toolbar menus
-
Thanks so much for this plugin! I’m trying to hide all toolbar menus except for profile access. I can make it work with one item as per the code you provided, but I can’t figure out how to hide MULTIPLE menu items. This (and other iterations I’ve tried) is not working. Can you please help?
/**
* Filter hidden Toolbar menus on the front-end.
*
* @param array $ids Toolbar menu IDs.
* @return array (maybe) filtered front-end Toolbar menu IDs.
*/
function wpdocs_hide_some_toolbar_menu( $ids ) {
$ids[] = ‘wpseo-menu’;
return $ids;
}
function wpdocs_hide_some_toolbar_menu( $ids ) {
$ids[] = ‘wp-logo’;
return $ids;
}
add_filter( ‘rda_frontend_toolbar_nodes’, ‘wpdocs_hide_some_toolbar_menu’ );
add_filter( ‘rda_toolbar_nodes’, ‘wpdocs_hide_some_toolbar_menu’ );
- The topic ‘Hiding multiple toolbar menus’ is closed to new replies.