Home / admin / Add codex search to dashboard
  • How to Add codex search to dashboard


    Adding this PHP code snippet to the functions.php of your wordpress theme will add a search field to your dashboard for searching the wordpress codex.

    ( click code to copy )

    wordpress snippet : PHP

    function wp_codex_search_form() {
        echo '<form target="_blank" method="get" action="http://wordpress.org/search/do-search.php" class="alignright" style="margin: 11px 5px 0;">
            <input type="text" onblur="this.value=(this.value==\'\') ? \'Search the Codex\' : this.value;" onfocus="this.value=(this.value==\'Search the Codex\') ? \'\' : this.value;" maxlength="150" value="Search the Codex" name="search" class="text"> <input type="submit" value="Go" class="button" />
    add_filter( 'in_admin_header', 'wp_codex_search_form', 11 );

    ( WordPress codex functions, hooks, in this snippet. )

    admin_head, add_filter, wp,