Add site description to site title

<?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 );
view raw functions.php hosted with ❤ by GitHub

Bill Erickson

Bill Erickson is a freelance WordPress developer and a contributing developer to the Genesis framework. For the past 14 years he has worked with attorneys, publishers, corporations, and non-profits, building custom websites tailored to their needs and goals.

Ready to upgrade your website?

I build custom WordPress websites that look great and are easy to manage.

Let's Talk