Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created September 25, 2015 20:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billerickson/9b3fee515250236c588c to your computer and use it in GitHub Desktop.
Save billerickson/9b3fee515250236c588c to your computer and use it in GitHub Desktop.
<?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