How to Add a Codex Search Box to the WordPress Dashboard

How to Add a Codex Search Box to the WordPress Dashboard

Many times when working with WordPress you’ll need to search the codex for something. I found this handy little snippet from Jared Williams that makes searching the codex very convenient. It adds a box to the header of the WordPress dashboard, as pictured here. Type in your search and it opens in a new window.

Simply add this snippet to your functions.php file and the box will appear in your dashboard:

{code type=php}/**
* ADD WP CODEX SEARCH FORM TO DASHBOARD HEADER
*/
function wp_codex_search_form() {
echo ‘


‘;
}
add_filter( ‘in_admin_header’, ‘wp_codex_search_form’, 11 );{/code}