Skip to content

Instantly share code, notes, and snippets.

@srikat
Last active February 17, 2016 02:45
Show Gist options
  • Save srikat/11280026 to your computer and use it in GitHub Desktop.
Save srikat/11280026 to your computer and use it in GitHub Desktop.
How to replace Site Title text with custom HTML in Genesis.
<?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