0

I have a site where any Title of a Post that has an apostrophe or a hyphen ends up displaying to the site visitor as if those characters were not there. My permalinks are functioning just fine so I don't want to mess that up. However, I really need Titles to be formatted with correct grammar. Instead of something like:

I dont want to mess that up.

Help.

  • 1
    switch to default theme, does it still happen? – Milo May 30 '13 at 23:08
  • I had a simular issue once when watching the site in Firefox. It was caused by doing copy and paste the title from a pdf file. Pasting it in a text editor striping away hidden format solved the problem. Just an idea.. – Luckyfella Jul 15 '17 at 15:42
0

There is function I like to use which is the_title_attribute(). It allows to escape character entity so you can get a "clean version" of title that won't mess up.

In your case, check if there's some filter applied, maybe some regex that format your titles.

  • I'm sorry I don't understand your suggestion. Could you please be more specific? I'm not new to html or css but I'm not familiar enough with WordPress or PHP to know how to use what you mentioned. Thank you. – Joy May 31 '13 at 5:08
  • I thing @Joy is talking about the post title not the title attribute. – RRikesh May 31 '13 at 5:39
  • @joy : I'm talking about some function which makes your quotes disappear - look into functions.php or some plugin. There must be something that just drop quotes. the_title_attribute() provides a clean version of post title when used. – JMau May 31 '13 at 12:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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