WordPress.org

Ready to get started?Download WordPress

Forums

Hide Admin Bar Search
[resolved] This is just CSS - know PHP method? (2 posts)

  1. Jason Lemahieu (MadtownLems)
    Member
    Posted 3 years ago #

    No offense, but this plugin seems pretty trivial, as it only outputs

    #wpadminbar #adminbarsearch {display: none;}

    which someone could quite easily do much quicker with their CSS editor.

    Do you know how to remove it with PHP?

    http://wordpress.org/extend/plugins/hide-admin-bar-search/

  2. Helen Hou-Sandi
    WordPress Dev
    Plugin Author

    Posted 3 years ago #

    Yes, this is a small plugin indeed. However, it addresses the following:

    • Not all people are comfortable editing their CSS
    • It also hides the search in the admin/dashboard, which is not a CSS file you should be editing
    • One may want it to be network-wide regardless of what theme is being used in a multisite situation (which was my reason for writing this in the first place)

    There is no way to remove it using PHP - it's baked directly in the render() method for the admin bar class. Believe me, if I could have done it that way, I would, and then would have titled the plugin "Remove Admin Bar Search" instead of "Hide Admin Bar Search".

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic