How to add link to comments when commenting is disabled for posts in Genesis

Posted on
5/5 - (259 votes)

By default bylines or post info in Genesis shows the published date, author link, link to comments and edit links.

Posts for which comments have been turned off by unchecking “Allow comments.” in the Discussion meta box in post editor will not show the link to comments.

It is possible to show comments link by simply setting hide_if_off to false in the [post_comments] shortcode either in a function hooked to genesis_post_info and/or in the Post Info field of Featured Posts widget(s).

Add the following in child theme’s functions.php:

// Customize entry meta in the entry header
add_filter( 'genesis_post_info', 'sp_post_info_filter' );
function sp_post_info_filter( $post_info ) {

	$post_info = '[post_date] by [post_author_posts_link] [post_comments hide_if_off=false] [post_edit]';

	return $post_info;

}

Source: genesis/lib/shortcodes/post.php