Created
May 10, 2015 15:08
-
-
Save reasonstousegenesis/aa2bd9b7335966ecdafb to your computer and use it in GitHub Desktop.
Withhold comment dates only on some post types
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
<?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