WordPress Posting and Commenting Tips

Posted July 30th, 2007 by Mike Cherim

WordPress is smart — really smart — and I like that, but it requires the right input if you want to exercise its abilities. What follows are a few things I do to get the most out of WordPress’s highly professional desktop-like web publishing features. Many of the tips I will offer carry over to the commenting side as well, not just article posting. Please know that I am not using the Visual Rich Editor so while most of the posting tips will apply, they may not be all shared.

Forming Paragraphs

This feature applies to more than just WordPress. I dare say most publishing platforms — blogs, wikis, forums — offer this functionality. Function being the operative part; specifically the PHP Hypertext Preprocessor (PHP) function that goes by the name autop(). As the name implies, it automatically creates the <p></p> or paragraph element.

To use it, on your keyboard just hit Enter twice to create two new lines in the text area. The second line will begin the new paragraph. Hitting Enter once will create a break element. This should be avoided because it can look sloppy, especially if the text is enlarged.

Example of creating paragraphs

<!--Enter text this way…-->
 Line ONE entered in the textarea in relation to line TWO.
 Line TWO entered in the textarea in relation to line ONE.

<!--And it will output this automatically…-->
 <p>Line ONE entered in the textarea in relation to line TWO.<br />
 Line TWO entered in the textarea in relation to line ONE.</p>

<!--But enter text this way…-->
 Line ONE entered in the textarea in relation to line TWO.

 Line TWO entered in the textarea in relation to line ONE.

<!--And it will output this automatically…-->
 <p>Line ONE entered in the textarea in relation to line TWO.</p>

 <p>Line TWO entered in the textarea in relation to line ONE.</p>

This feature is available during posting and commenting.

Other Cool Conversions

I’ve always thought of this type of script as a SmartyPants-type script. SmartyPants is a project by John Gruber. It is an outstanding script that performs all sorts of intelligent feats of conversion. WordPress is equipped with a comparable script.

It does a lot on behalf of the author. Certain simple plain text characters — plain text as opposed to text produced by Word — can be converted into fancy typographer counterparts in a way that is stable on all systems. (Stable is not the case when pasting already-converted characters into the text area.) Character conversions include the following and apply to both posting and commenting…


Plain text quotes, the straight up-and-down variety — "plain quoted text" — will be converted into this: fancy quoted text (produces &#8220;quoted text&#8221;).


A plain text apostrophe, the straight up-and-down variety — Mike's — will be converted into this: Mikes (produces Mike&#8217;s).

A leading apostrophe, however — you know, like 'Tis plain text — will produce this: Tis fancy text, but not reliably or so I’ve experienced. Instead of producing &#8216;Tis fancy text you can sometimes get &#8217;Tis fancy text, which is incorrect. I sometimes have to enter it manually. (See update comment.)


As above, ampersands are also converted — escaped, if you will. An ampersand should not be written as &. It needs to be written as &amp;. You’ll encounter ampersands in text and headings, and also in web addresses. WordPress, and many of the publishing platforms I mentioned above, will automatically convert them, even in a web address, so you don’t have to. (WordPress converts it to &#038;, not &amp;, but either way is fine.)

N- and M-Dashes

You may have noticed m-dashes in the text above. It’s this and it’s written like this -- (produced as &#8212;). According to the WordPress documentation you are supposed to enter two hyphens, -- to get an n-dash, (produced as &#8211;), and three hyphens --- to get an m-dash, (produced as &#8212;). I have found that this is not the case when posting. Two or three hyphens produce an m-dash. An n-dash, if needed, must be entered manually: &#8211;.

Important: This does not carry over to posting comments. When commenting, if you want to produce a real m-dash, , you must enter three hyphens ---.

Writing Code or Mark-up

The good old code tags, <code>code</code>, which are also available for use when commenting, sort of undo all of that above. Anything within code tags won’t be converted, it’ll leave your quotes, apostrophes, n- and m-dashes alone, As a result, additional steps may needed in some cases, since ampersands will still be converted, to write character codes as I have above, I have to convert the ampersands manually, like this: &amp;#8212; if I want to produce this: &#8212; for all to see.

If you want to write a lot of code you may want to use the pre element (pre short for preserve, as in preserve white space). An example of this element, as I have it styled, can be viewed previously in this article. Bear in mind, though, the code or mark-up portion inside of the pre element should also be used within the code element to be precise. I haven’t done this prior to here and now, instead opting to use the pre element alone, but it just occurred to me that I haven’t really been doing it right. As a result I can now properly add the code element around code or mark-up and style it, pre code { }, in my style sheets to make published code even more readable.

Important: If you want to write angle brackets, you must convert them, as follows: &lt; for the less than symbol < and &gt; for the greater than symbol >. If you don’t WordPress will try to render the contents as HyperText Mark-up Language (HTML).

The Power of the Optional Excerpt

This WordPress feature doesn’t apply to commenting, but for the author publishing an article or post, it’s a powerful ally. Normally formatting of links, emphasis elements, embedded image mark-up, and other mark-up will not be carried over to the front page of an excerpt-capable theme like this one if the <!--more--> tag is used to mark the excerpt or if you let WordPress do it automatically, adding […]

For some reason all the good stuff is stripped away. Thus, if you want to offer images in your excerpts like I do, for instance, you must paste the content and mark-up into the post editor page’s “Optional Excerpts” textarea. This is a great feature as it gives you absolute control over what is in your excerpts. Since the excerpt itself will not have a permalink, I typically use the first paragraph of my post as the excerpt.

The Empowered Commenting Author

For people commenting on posts there are restrictions as to what mark-up can be posted, other than what’s noted above. For post authors, though, there are no restrictions. In other words, if the author wants to use the pre element in a comment he or she can. :E

12 Responses to: “WordPress Posting and Commenting Tips”

  1. JackP responds:
    Posted: July 30th, 2007 at 11:36 am

    I tell you what bugs me, is that there doesn’t seem to be a clever enough way to use code in post headings.

    For example, my recent post has a title like this:

    Psychic Kitten <span lang=’fr’>Qu’est-ce que c’est?</span>

    Theoretically, that’s what I need to do. I’m changing the language, I need to mark it up. The problem however is that while wordpress is mostly okay with this — it displays fine, assuming I use single quotes for attribute values — the whole span thing shows up as a title/tooltip.

    What I’d like is for it to be clever enough to accept my heading as is, but to strip out any HTML tags from it before using it elsewhere - e.g. in headings and the like.

  2. JackP responds:
    Posted: July 30th, 2007 at 6:45 pm

    I might try and have a play with that. Maybe if I can identify whether the title contains “<span” then use “reading the rest of this post”; otherwise use as normal…

  3. Tommy Olsson responds:
    Posted: July 31st, 2007 at 1:27 am

    English is not my first language, but is your text about apostrophes really accurate, Mike?

    If you want to write ’Tis fancy text, surely U+2019 (8217 decimal) is the correct character, since you want a regular apostrophe – just as in Mike’s. The apostrophe in ’Tis signifies the elision of the initial ‘i’ in ‘it is’, doesn’t it?

    The only time you’d need U+2018 (8216 decimal) is when using British-style single quoting ‘like this’ instead of American-style double quoting “like this”. At least that’s what I thought, but I’m a foreigner so what do I know? :)

  4. John Faulds responds:
    Posted: August 1st, 2007 at 1:58 am

    If you want to write angle brackets, you must convert them, as follows: < for the less than symbol and > for the greater than symbol.

    I think you only need to do it for the less than symbol because if it doesn’t recognise the opening of the tag as HTML, it doesn’t matter if the last part is.

  5. milo responds:
    Posted: August 1st, 2007 at 2:55 pm

    Check this link, Mike, seems like they are using a function php to secretly place advertising on blogs that are using one of their themes, including some of yours.

  6. milo responds:
    Posted: August 3rd, 2007 at 4:06 am

    Derek wrote a warning post, I’ve done it at the WP forum, might be helpful for some users if you list this templatebrowser issue too? Informed weblog tool collection, Lorelle and a bunch of other designers, we’ll see if we can stop this.

Sorry. Comments are closed.

Note: This is the end of the usable page. The image(s) below are preloaded for performance only.