Great. Thank you very much!
It actually even works without the echo in TwentyTen.
Shouln’t it be <br />?
Do you also know how to remove the tags from the HTML title?
I’m away from my computer and can’t test anything right now, but I would think strip_tags() or something similar would do the trick…
Of course, you would need to use get_bloginfo so the data can be processed.
Thank you for your fast answer.
The idea is excellent, but unfortunately it doesn’t effect anything.
I replaced the original line of code in my header.php and it works fine.
My Tag Line Reads:
Helping Families
that’s how we roll!
The Tagline field in settings reads:
Helping Families – that’s how we roll!
Here is the code I used.
<div id="site-description"><strong><?php echo str_replace('-','<br />',get_bloginfo('description')); ?>
</strong></div>
The <br /> code does not work in the text input box, nor does the bold code. I would imaging you could us just about any html code in that line
You can see the page at: Nanaimo Toy Run
Beattle, did you actually read the original post? If you use html_entity_decode and get_bloginfo, you’re able to use HTML code in the description.
Anywar, the idea of using str_replace is not too bad.
I miss read the first post….thought it said “Is it possible”.
It says “It IS possible.”! :confused:
Getzel, I guess strip_tags() doesn’t work, because the angle brackets and quotation marks are masked. What do you think?
@h-u-g-o: if you use it with html_encode it should still work, since html_encode is returning legitimate tags which strip_tags can then remove. Once I get back to my computer I’ll see if I can’t figure out a simpler way, but this should work.
Thank you!
html_encode doesn’t work, it leads to Fatal error: Call to undefined function html_encode() in …
I tried htmlentities, but that results in characters like �.
With html_entity_decode it works. 🙂
🙂 That’s what I meant. So to recap, using html_entity_decode allows you to use HTML in your title or tagline, and strip_tags on the data that html_entity_decode returns gives you a clean string which can be used as a HTML title.
Exactly! Thank you very much! I’m happy with that. 🙂
Anyway, if you discover another way, please let me know.
PS: In addition, you can use str_replace to substitute a space for <br /> by way of example. Thanks to beattle!