Last active
August 29, 2015 14:08
-
-
Save dtbaker/b5bfe84ff36a67746566 to your computer and use it in GitHub Desktop.
Show WordPress post count per tag
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 ( 'wp_tag_cloud', 'tag_cloud_count' ); | |
function tag_cloud_count( $return ) { | |
return preg_replace('#(<a[^>]+\')(\d+)( topics?\'[^>]*>)([^<]*)<#imsU','$1$2$3$4 ($2)<',$return); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment