-
-
Save billerickson/9b3fee515250236c588c 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 | |
/** | |
* Add Site Description to Title | |
* | |
*/ | |
function be_desc_in_title( $title, $inside, $wrap ) { | |
$inside = '<a href="' . home_url() . '">' . get_bloginfo( 'name' ) . ' <span class="desc">' . get_bloginfo( 'description' ) . '</span></a>'; | |
//* Build the title | |
$title = genesis_html5() ? sprintf( "<{$wrap} %s>", genesis_attr( 'site-title' ) ) : sprintf( '<%s id="title">%s</%s>', $wrap, $inside, $wrap ); | |
$title .= genesis_html5() ? "{$inside}</{$wrap}>" : ''; | |
return $title; | |
} | |
add_filter( 'genesis_seo_title', 'be_desc_in_title', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment