Whenever I use the term 'CSS' in a post title, the rest of the title (after the term 'CSS'), is inserted at the top of the single post page.

What steps will reproduce the problem?
1. Create a new post.
2. Type 'CSS' somewhere in the post title.
3. Preview/publish the post.

What is the expected output? What do you see instead?
I expect to see the page title appear as normal, which it does. However, at the top of the page, above the opening body tag, everything in the title after the term 'CSS' is inserted.

What version of the product are you using?
WordPress 3.3

Here is a link to illustrate the issue: http://joshnh.com/2001/12/test-css-title/

2 Answers 2


Disable all plugins. One of them puts all words with capital letters in a <span class="caps"> container. In

<meta property="og:title" content="test <span class="caps">CSS</span> title" />

… this closes the <head> section automatically because output is not allowed in <head>.

If you have found the plugin tell its author about the Bug. I’m sure s/he wants to know about this.

Parsed code in Opera’s debugger:

Parsed code in Opera’s debugger

  • 2
    I guess it's WP Typography...
    – kaiser
    Commented Dec 14, 2011 at 7:49
  • 2
    This is not a wp-typography bug; it is a theme bug. The theme is using the_title() to inject the title name instead of the_title_attribute() which strips HTML from the title for use in attribute tags. Commented Dec 14, 2011 at 17:48

Use the style.css for css related codes. And don't hard code your title. I mean don't insert any css tags while filling the title. Insert the code in your template file.


<div class="title">
<?php the_title(); ?>

Now go to style.css and insert your css like this

.title {
  • Sorry, I should have made myself clearer. If I use the letters C.S.S. in this fashion: Pure CSS Ribbon, then the problem occurs. I am not inserting code into my title.
    – joshnh
    Commented Dec 14, 2011 at 5:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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