Skip to content

Instantly share code, notes, and snippets.

@ecoofficegals
Created June 15, 2013 22:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ecoofficegals/15422385addbc9bd1e03 to your computer and use it in GitHub Desktop.
Save ecoofficegals/15422385addbc9bd1e03 to your computer and use it in GitHub Desktop.
//* Custom search results page
remove_action( 'genesis_loop_else', 'genesis_do_noposts' );
add_action( 'genesis_loop_else', 'my_do_noposts' );
function my_do_noposts() {
$term = $_GET['s']; // store the search term in a variable
echo '<div class="entry-content">';
echo '<div class="post">';
printf( '<p>%s</p>', apply_filters( 'genesis_noposts_text', __( '<p>Sorry, but nothing matched your search criteria for: <strong>' . $term . '</strong>.</p><p>Please try again with some different keywords below.</p>', 'genesis' ) ) );
printf( '<div class="genesis-search">' . get_search_form() . '</div>' );
echo '</div><!-- close entry-content -->';
echo '</div><!-- close post -->';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment