Rendering Apostrophes in Post Titles

June 20th, 2012 | Posted by Emmett in Site Development
I noticed when I published my first "Wednesday's Weekly Comic Cover" post earlier today that pages that aggregated posts (the main page or category/tag pages) would not display the apostrophe in the post title. While I'm certainly not a grammar expert, obvious lapses in grammar (like you're versus your) really annoy me, and that apostrophe being omitted was no exception. Fortunately for me, the fix was pretty simple. After reading around I found some of the code governing how post titles (and many other items) are displayed in WordPress's default-filters.php file. Specifically, I commented out line 131 which appeared as: // Display filters add_filter( 'the_title', 'wptexturize' ); While I haven't done a lot of extensive testing to see what other effects removing this filter will have, it appears to have fixed my issue with little impact elsewhere. So if you're having a similar problem, try this simple fix to see if it works for you.

You can follow any responses to this entry through the RSS 2.0 You can skip to the end and leave a response. Pinging is currently not allowed.

One Response

Leave a Reply

Your email address will not be published. Required fields are marked *