Hide Any Element in the WordPress Admin

The Pro version of the PublishPress Capabilities plugin allows to hide any element inside the WordPress admin area. If you can find the CSS class or ID, then you can hide that element.

In this example, we will hide the search box on post screen. Looking at the code for this search box, it has a class of search-box.

Search Box
Search Box
  • Go to “Capabilities” and then “Admin Features”.
  • Choose the user role for which you want to hide the search box.
  • Give a Label to this setting.
  • Enter the class as .search-box
  • Click “Add”.
Screen Shot 2022 04 15 At 1.55.03 Pm
Screen Shot 2022 04 15 At 1.55.03 Pm
  • When a user in this role visits the Posts screen, the search box will be hidden for them:
Hide Posts
Hide Posts

Professional publishing plugins for WordPress! Get PublishPress

  • SUBSCRIBE TO OUR NEWSLETTER
  • SEARCH THIS SITE