Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I guess I would like to be able to include HTML tags within the title so that when the title is listed certain words are bolded.

Is this possible? When I try to put HTML into the title, the tag itself is output (escaped) in the final page list.

share|improve this question
    
never tried this personally, but I think you could probably build a "filter" to do this for you. Maybe something in this support thread will help: wordpress.org/support/topic/… –  Zach L Dec 25 '12 at 21:16
    
alternatively, you could just use a custom meta field (with html) which you could code to take precedence over the title if present. –  Zach L Dec 25 '12 at 21:18
    
Zach, that's what I ended up doing, was a cinch. Just learning WP so thanks for answering an obvious question. –  brushleaf Dec 25 '12 at 23:28
    
glad to be of help ;-) good luck in your future WordPressin' –  Zach L Dec 25 '12 at 23:35

1 Answer 1

up vote 2 down vote accepted

Yes, you can use HTML elements in post titles by default. If your output is escaped a plugin or theme might have touched that. Disable all plugins and switch to TwentyEleven. This will help you to identify the source.

Note that markup is stripped in some places where it is not allowed: title attributes and elements, feed markup, nav menus. You should not break that.

Also make sure your markup is valid and allowed for your user role. The kses filter will try to remove it otherwise.

share|improve this answer
    
Turns out that my theme was escaping it. I have moved to using a custom meta tag since I want the title to appear normal in other instances. –  brushleaf Dec 25 '12 at 23:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.