Skip to content

Instantly share code, notes, and snippets.

Created Jan 4, 2019
What would you like to do?
* Display Posts, search form if no results
* @see
function be_dps_no_results_search( $message ) {
$message = '<div class="display-posts-listing no-results">';
$message .= '<p>It seems we can’t find what you’re looking for. Perhaps searching can help.</p>';
$message .= get_search_form( false );
$message .= '</div>';
return $message;
add_filter( 'display_posts_shortcode_no_results', 'be_dps_no_results_search' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment