Hide search form in WordPress toolbar

Hide search form in WordPress toolbar

//Hide search form in WordPress toolbar
function hide_admin_bar_search () {
	echo '<style type="text/css">
	#adminbarsearch {
		display: none;
	}
	</style>';
}
add_action('admin_head', 'hide_admin_bar_search');
add_action('wp_head', 'hide_admin_bar_search');

Need Help?

Do you need any help on WordPress? I'm happy to help you.

Contact Me