Display Search Query When Using Genesis Framework

When using the Genesis framework, you can use the snippet below in your search.php to display the search query:

<?php

add_action('genesis_before_loop', 'wpkb_show_search_query', 5);
function wpkb_show_search_query()
{
    $search_query = esc_html(get_search_query());
    if ($search_query == '') {
        $search_query = 'nothing';
    }

    echo wptexturize('<div class="search-query"><h1 class="entry-header">Search Results for \''.$search_query.'\'</h1></div>');
}

genesis();