Skip to content

Instantly share code, notes, and snippets.

@anythinggraphic
Last active August 29, 2015 14:14
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 anythinggraphic/46ca308c0cc1bb26ec40 to your computer and use it in GitHub Desktop.
Save anythinggraphic/46ca308c0cc1bb26ec40 to your computer and use it in GitHub Desktop.
Genesis: 'No Posts Found' Text String
<?php
//* Custom text for "No posts found" (Genesis Framework)
//* @link http://anythinggraphic.net/change-no-posts-text-string
add_filter(‘genesis_noposts_text’, ‘no_posts_found’);
function no_posts_found($text) {
$text = ‘<span class="if_you_want_one"’ . __(‘Your custom no posts found text goes here.’) . ‘</span>';
}
return $text;
}
<?php
//* Custom text for "No posts found" (Basic WordPress)
//* @link http://anythinggraphic.net/change-no-posts-text-string
?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php endwhile; else: ?>
<p>Your custom no posts found text goes here.</p>
<?php endif; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment