Created
May 13, 2012 01:51
-
-
Save imjjss/2670212 to your computer and use it in GitHub Desktop.
filter the name of your blog to be red every time it appears in a post
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 | |
add_filter('the_content', 'styleBlogName'); | |
function styleBlogName($content) { | |
$blogTitle = get_bloginfo('name'); | |
$content = str_replace($blogTitle, '<span style="color: Red;">' . $blogTitle . '</span>', $content); | |
return $content; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment