In WordPress administrator -> Settings there’s a tagline / description field:
For example:
<div id="tagline"><p><?php bloginfo( 'description' ); ?></p></div>
description: I'm a <strong>web</strong> and graphic designer
But it seems like it only allows text not HTMl tags.
Is there any way of doing this o I have to create a new field?
The option is run through a filter that replaces HTML entities, so even if you were to run a filter on that option(which is possible), WordPress replaces the HTML entities, meaning HTML wouldn’t work…
For example, add this code and watch what happens.
There aren’t any hooks i can see that specifically deal with this option and convert the entities, else i’d have ideas about unhooking that action from the description.
I think the only solution you really have is to run
str_replace
over your calls to fecth the blog description. This would mean updating all your calls forbloginfo( 'description' )
with a rountine that performs string replacement on the content.eg.
Sure it’s not ideal, but i can’t currently see a more elegant way(though i’d be happy for someone to prove me wrong).
You could just change it in your stylesheet.
Use
html_entity_decode
combined withget_bloginfo
(instead ofbloginfo
). So replace:By:
Note: Tested on WordPress 3.8.1.