Below is the code to add line breaks, i.e. HTML <br> elements, to Genesis site description.
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 | |
//* Replace default site description with description containing line breaks | |
remove_action('genesis_site_description', 'genesis_seo_site_description'); | |
add_action('genesis_site_description', 'prefix_site_description_with_br'); | |
function prefix_site_description_with_br() { | |
$blogdesc = get_bloginfo('description'); | |
$blogdesc = preg_replace("/, */", "<br>", $blogdesc); ?> | |
<p class="site-description"><?php | |
echo $blogdesc; ?></p> | |
<?php | |
} |