Skip to content

Instantly share code, notes, and snippets.

@gspice
Created January 11, 2015 22:32
Show Gist options
  • Save gspice/b60ec8876f72f9cbae5d to your computer and use it in GitHub Desktop.
Save gspice/b60ec8876f72f9cbae5d to your computer and use it in GitHub Desktop.
Replacing "Sorry, no posts match your criteria" message with something else. Works on archive-listing.php template for AgentPress Listings search results.
/** Change Text Shown When No Posts Are Found */
add_filter('genesis_noposts_text', 'eo_noposts_text');
function eo_noposts_text($text)
{
$text = '<span class="noposts-text">' . __('Your request did not return any results, please check back later.', 'eo') . '</span>';
return $text;
}
//If you want to style the text that is displayed just add some styles in the style-sheet for .noposts-text.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment