Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Add line break to site description at "--" in Genesis child themes
<?php
add_filter( 'genesis_seo_description', 'jmw_site_description', 10, 3 );
/**
* Add line break to site description at "--" in Genesis child themes
* @link http://www.jowaltham.com/line-break-site-description-genesis
*
* @param string $description The html string that is output as the site description
* @param string $inside The site description in General Settings
* @param string $wrap The html string to wrap around the site description
*
* @return string Modified description
*/
function jmw_site_description( $description, $inside, $wrap ) {
$inside = str_replace( '--', '<br />', $inside );
$description = sprintf( "<{$wrap} %s>", genesis_attr( 'site-description' ) );
$description .= "{$inside}</{$wrap}>";
return $description;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.