Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Customize the Post Info Conditionally on Home Page and Single Post in Genesis Sample Theme
// 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