Created
July 8, 2014 09:21
-
-
Save hellofromtonya/25b84e6a61d55e031490 to your computer and use it in GitHub Desktop.
Add Comment Count + Additional Text to Comment Title
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
add_filter('genesis_title_comments', 'do_shortcode', 20 ); | |
add_filter('genesis_title_comments', 'lunarwp_add_comment_total_to_comment_title', 10, 1); | |
/** | |
* Add the comment count to the title | |
* | |
* @since 1.0.0 | |
* | |
* @param string $title | |
* @return string Amended comment title | |
*/ | |
function lunarwp_add_comment_total_to_comment_title($title) | |
{ | |
return str_replace('<h3>Comments', '<h3>[post_comments more="% Comments - <span>Click Here to Share Your Thoughts</span>" one="1 Comment - <span>Click Here to Share Your Thoughts</span>"]', $title); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment