Last active
August 29, 2015 14:14
-
-
Save anythinggraphic/46ca308c0cc1bb26ec40 to your computer and use it in GitHub Desktop.
Genesis: 'No Posts Found' Text String
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
<?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; | |
} |
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
<?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