Created
December 11, 2013 23:04
-
-
Save AmeliaBriscoe/7920173 to your computer and use it in GitHub Desktop.
Customize the Thesis 2.1 Comment Intro Text and use the count feature.
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
/* Customise the comment intro if there were comments or not */ | |
function comment_intro_replace($text) { | |
global $wp_query; | |
$number = (int) count($wp_query->comments_by_type['comment']); | |
if ($number == 0) | |
$text = ''; | |
return $text; | |
} | |
add_filter('thesis_comments_intro','comment_intro_replace'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment