From the category archives:

Tech Geek

How to turn off WordPress smart quotes

Post image for How to turn off WordPress smart quotes

by bledsoe on January 30, 2010

Smart quotes (aka curly quotes) are what most word processor programs insert into your document when you type the quote marks key.  They're pretty to look at, but they cause problems if you use them in a text document that contains code intended to be read by a computer.  That's normally not a problem since text editors don't create smart quotes when you type the quote key, but if you happen to find a cool chunk of code on a blog somewhere and you cut and paste it into a text file, if the blog you're copying the code from uses curly quotes, then you have a problem.

The bad news is, WordPress automatically converts all quote symbols to smart quotes, so if you post code snippets to your blog and they have quote marks in them, anyone who attempts to copy and paste that code into their own text file is going to have problems running the code. The good news is, you can turn this feature off.

There are actually a few different ways to do this, including modifying the functions.php file in your theme folder, or modifying the default-filters.php file in your wp-includes folder. But I like creating a separate php file and making it into a WordPress plugin, as described in this post by Katja Stokley. Create a text file called TurnOffSmartQuotes.php and put this in it:

<?php
/*
Plugin Name: TurnOffSmartQuotes
Plugin URI:
Description: Stops WordPress from converting your quote symbols into smartquotes. The three lines below stop the smartquote conversion in 1) your post content, 2) your comments, and 3) your post excerpts.
Version: 0.1
Author: Katja Stokley
Author URI:
*/
remove_filter('the_content', 'wptexturize');
remove_filter('comment_text', 'wptexturize');
remove_filter('the_excerpt', 'wptexturize');
?>

Then just upload this file to your wp-content/plugins folder, login to your WordPress dashboard, select "Plugins," and activate your new plugin.  You've just turned off smart quotes on your WordPress blog.

{ 7 comments }

How to align your custom header with your navbar

January 21, 2010
Thumbnail image for How to align your custom header with your navbar

If you use the Thesis theme for your WordPress blog, you might have created your own custom header image for your site (kind of like mine, above).  If so, you may have noticed that your header image doesn't seem to align correctly with your navbar.  To get your header image and your navbar aligned, you'll [...]

Read the full article →

Removing the whitespace at the top of your Thesis blog

January 19, 2010
Thumbnail image for Removing the whitespace at the top of your Thesis blog

If you use the Thesis theme for your WordPress blog, you might have created your own custom header image for your site (kind of like mine, above).  If so, you may have noticed that there's a little bit of whitespace between the top of your browser window and the top of your header image (kind [...]

Read the full article →

Vonage vs. VOIPo

November 11, 2009
Thumbnail image for Vonage vs. VOIPo

A few months ago I compared my three-year experience with Vonage to my 6 month experience with Skype.  After my Skype phone died, I decided to try VOIPo, the new VOIP service from HostGator, and wanted to share my experience with them. VOIPo customer service can't be beat.  Though it's not available 24/7 (only 9-7 [...]

Read the full article →

How to change OpenOffice chart colors

October 23, 2009
Thumbnail image for How to change OpenOffice chart colors

As a frequent user of the OpenOffice apps, including the Calc spreadsheet (oo's version of Excel), I occasionally need to create a chart from some of my data.  Typically, I'll create a pie or bar chart in Calc, then copy and paste it into Writer (oo's version of MS Word).  Recently I created two pie [...]

Read the full article →

My Ubuntu-Windows dual boot disappeared!

August 20, 2009
Thumbnail image for My Ubuntu-Windows dual boot disappeared!

I've been thoroughly pleased with Ubuntu, the open-source operating system I've been using for the past several months.  I installed it on both my home and work computers, keeping my original Windows XP installations on both machines so I could easily boot into either system at startup, and the whole process has been mostly painless. [...]

Read the full article →

A simple tweak for the WordPress YARPP plugin

August 16, 2009
Thumbnail image for A simple tweak for the WordPress YARPP plugin

Someone recently asked me to make a small change to the Yet Another Related Posts Plugin (YARPP) which she had recently added to her WordPress site.  (For each of your published posts, YARPP will display a list of related posts, the idea being that if readers enjoyed the post they just read, they might want [...]

Read the full article →

Skype vs. Vonage

July 31, 2009
Thumbnail image for Skype vs. Vonage

We used Vonage as our home phone service for about 3 years, and for the most part were pretty pleased.  I initially decided to try Vonage because they offered a phone line with unlimited local and long distance calling for about half what I was paying my previous phone provider, BellSouth ($30/mo vs. $50-60/mo).  While [...]

Read the full article →

How to add clickable icons to your WordPress sidebar

July 28, 2009
Thumbnail image for How to add clickable icons to your WordPress sidebar

You know how a lot of WordPress blogs have nifty icons in one of the sidebars, ones you can click on to go to, say, that blogger's twitter or facebook page?  They're really simple to add. It's essentially a 2-step process: Upload the icon image(s) to your media library.  You can find a ton of [...]

Read the full article →

Merging WordPress blogs

July 20, 2009
Thumbnail image for Merging WordPress blogs

Merging two or more WordPress blogs is a fairly straightforward task.  The exporting and importing steps, which actually copy all of your blog posts from your source blog(s) and move them into your target blog, are handled with just a few clicks of the mouse button.  The planning beforehand and the cleanup afterward take a [...]

Read the full article →