Last active
June 8, 2017 09:57
-
-
Save topleague/772e723532464da8ee6df048c5e0bf74 to your computer and use it in GitHub Desktop.
Customize the Post Info Conditionally on Home Page and Single Post in Genesis Sample Theme
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
// Customize the Post Info Conditionally on Home Page and Single Post in Genesis Sample Theme | |
add_filter( 'genesis_post_info', 'post_info_filter' ); | |
function post_info_filter( $post_info ) { | |
if ( is_front_page() || is_archive() ) : | |
$post_info = '[post_date] [post_comments zero="0 Comments" one="1 Comment" more="% Comments"]'; | |
return $post_info; | |
elseif (is_single()) : | |
$post_info = 'By [post_author_posts_link] on [post_date] [post_comments zero="0 Comments" one="1 Comment" more="% Comments"]'; | |
return $post_info; | |
endif; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment