-
-
Save ecoofficegals/15422385addbc9bd1e03 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//* 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