-
-
Save GaryJones/c2b4fa187066489729cb to your computer and use it in GitHub Desktop.
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 | |
// Don't include above <?php | |
add_filter( 'genesis_post_comments_shortcode', 'prefix_post_comments_shortcode' ); | |
/** | |
* Amend the post comments shortcode to add extra markup for styling. | |
* | |
* @author Gary Jones | |
* @link http://gamajo.com/style-comment-number/ | |
* | |
* @param string $output HTML markup. | |
* | |
* @return string HTML markup. | |
*/ | |
function prefix_post_comments_shortcode( $output ) { | |
return preg_replace( '/#comments"\>(\d+) Comment/', '#comments"><span class="entry-comments-number">$1</span> Comment', $output ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment