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