Remove Search Box on WordPress Admin Bar

I wanted to disable the search box on my WordPress Admin Bar that’s found on the far right of the toolbar.

Here’s the code I used (and where I added it) to make this happen:

  1. Access your active WordPress theme and open the functions.php file.
  2. Paste the code snippet below into the file, and save!

[code type=”php”]
* Disable the Search Icon and Input within the Admin Bar
function disable_bar_search() {
global $wp_admin_bar;
add_action( ‘wp_before_admin_bar_render’, ‘disable_bar_search’ );

Throwback Thursday!
Exclude Digg Digg From Select Pages is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to

Send this to a friend