Created
April 2, 2016 12:50
-
-
Save calliaweb/39efc318f02a2a5ef295735f93bcdae2 to your computer and use it in GitHub Desktop.
Add line break to site description at "--" in Genesis child themes
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_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