Skip to content

Instantly share code, notes, and snippets.

@reasonstousegenesis
Created May 10, 2015 15:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reasonstousegenesis/aa2bd9b7335966ecdafb to your computer and use it in GitHub Desktop.
Save reasonstousegenesis/aa2bd9b7335966ecdafb to your computer and use it in GitHub Desktop.
Withhold comment dates only on some post types
<?php
// Paste the code BELOW this line into your child theme functions.
/**
* Withhold comment dates only on some post types
*
* @author Reasons to Use Genesis
* @link http://reasonstousegenesis.com/remove-comment-dates/
*/
add_filter( 'genesis_show_comment_date', 'rtug_withhold_comment_date', 10, 2 );
function rtug_withhold_comment_date( $comment_date, $post_type ) {
if ( 'page' === $post_type )
return false;
else
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment