Skip to content

Instantly share code, notes, and snippets.

@topleague
Created June 28, 2017 07:27
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Remove Comment Time & Link Inside the Date Field in Genesis
// Remove Comment Time & Link Inside the Date Field in Genesis (h/t: http://www.jowaltham.com/customising-comment-date-genesis/)
add_filter( 'genesis_show_comment_date', 'topleague_remove_comment_time_and_link' );
function topleague_remove_comment_time_and_link( $comment_date ) {
printf( '<p %s>', genesis_attr( 'comment-meta' ) );
printf( '<time %s>', genesis_attr( 'comment-time' ) );
echo esc_html( get_comment_date() );
echo '</time></p>';
// Return false so that the parent function doesn't also output the comment date and time
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment