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 the co-founder and lead developer at CultivateWP, a WordPress agency focusing on high performance sites for web publishers.

About Me
Ready to upgrade your website?

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

Let's Talk