For design purposes I need line breaks in a multilingual site name. I have managed to do so by adding <br />
tags in the site name variable. But they show in the title within the html head tag and I don't know how to get rid of them.
I am using a custom Zen subtheme to which I have added the html.tpl.php file. In that I have tried the following approaches to no avail:
<title><?php print preg_replace('/<br \/>/iU', '', $head_title); ?></title>
<title><?php print strip_tags($head_title); ?></title>
<title><?php $head_title = str_replace('<br />', '', $head_title);
print $head_title; ?></title>
Please excuse any profanities I may have committed in the use of php, I am no coder. Any ideas are most welcome.
<h1>
element that forces the line break naturally? It would probably be easier :) Oh, and did you clear the caches after adding the template file? It won't be picked up until you do. All 3 of the code examples you've given should work perfectly<title>test</title>
and clear your cache, will your page display test as a title ?