WordPress Displaying Code in Square Brackets?

You probably want to search for shortcode. Shortcode is the term used for code that bloggers and plugin developers can use

Tweet This

Written by Damon on December 9, 2008

You probably want to search for shortcode.

Shortcode is the term used for code that bloggers and plugin developers can use to embed code within a WordPress Post or Page.

The purpose of the remainder of this post is to SEO for words that non-coders search for so that people who don’t know what shortcode is can find this post and learn what search terms to use in order to find a solution. I’ll also share the solution to my specific problem.

WordPress Caption and Form Code Not Working

I recently had a problem with another WordPress blog of mine where code nested in square brackets started displaying. In my case, the problem was with the image caption code and with my contact forms (I tried changing contact form plugins to see if that solved the problem.

I stupidly performed a bunch of updates at the same time with only a cursory check in between so I wasn’t really sure what caused the problem. So off I went to Google to figure out if it knew.

The problem was that there weren’t any relevant results in the language that I used for my searches and I didn’t know the correct technical term. My searches included terms like:

  • square brackets display code WordPress
  • WordPress not parsing code square brackets

and similar combinations.

Luckily, I know enough PHP and WordPress to figure out that the technical term for the code that gets inserted in to Posts and Pages in WordPress is shortcode. If you’re having any problems with stuff displaying within square brackets that shouldn’t be displayed, try searching with the term shortcode.

I can’t find the post that helped me but the problem was with the Google Website Optimizer for WordPress plugin.

I hope this helps you figure out your problem.

[edit]I posted a fix for this problem in my Shortcode with Google Website Optimizer for WordPress post.[/edit]


7 replies to “WordPress Displaying Code in Square Brackets?

  1. Chris

    Yes – this just helped me bigtime. Thanks much.

    Now though I’m supremely bummed the Optimizer plugin isn’t working (and doesn’t seem to have been updated recently). You ever work this out or find an alternative?

    Reply

  2. Post Author Damon

    Actually, I’m thinking of writing my own Optimizer plugin.

    I haven’t researched it too thoroughly, but the current Optimizer plugin seems to be a little nuclear inserting code everywhere even where it is not necessary.

    I think I could write a more precise plugin, but I’m a slow programmer so it would take a fair bit of time and I’ve got a couple of other plugins in various stages of completion.

    Reply

  3. Chris

    I found one other but it only supports one test per site!

    There’s gotta be a quick fix to the ContentRobot one we used. Ugh maybe I’ll poke around in the code over the weekend. I need this now! 🙂

    Reply

Leave a Reply

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