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.

Issue?
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/

share|improve this question
add comment

2 Answers

up vote 5 down vote accepted

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

share|improve this answer
2  
I guess it's WP Typography... –  kaiser Dec 14 '11 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. –  kingjeffrey Dec 14 '11 at 17:48
add comment

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.

Example:

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

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

.title {
font-weight:bold;
color:red;
}
share|improve this answer
    
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 Dec 14 '11 at 5:35
add comment

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.