Last active
February 17, 2016 02:45
-
-
Save srikat/11280026 to your computer and use it in GitHub Desktop.
How to replace Site Title text with custom HTML in Genesis.
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 | |
//* Do NOT include the opening php tag | |
add_filter( 'genesis_seo_title', 'custom_genesis_seo_title', 10, 1 ); | |
/** | |
* Replace Site Title text entered in Settings > Reading with custom HTML | |
* @author Sridhar Katakam | |
* @link http://sridharkatakam.com/replace-site-title-text-custom-html-genesis/ | |
* | |
* @param string original title text | |
* @return string modified title HTML | |
*/ | |
function custom_genesis_seo_title( $title ) { | |
$title = '<h1 itemprop="headline" class="site-title"><a title="Homepage" href="' . get_bloginfo('url') . '">Custom <span style="color: #0f709e">HTML</span> here</a></h1>'; | |
return $title; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment