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 comments… read them below or add one }
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?
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.
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!
I think changing the echo statements to return statements in go4wp_tracking_script might do the trick.
Chris,
You’re right about the echo statements.
I created a replacement function which I published in my Shortcode with Wordpress Google Website Optimizer Plugin post.
Also you’re email server wasn’t working. You might want to look in to it.
Greatings,
Great job. But not enought info. Where can i read more?
Have a nice day
Joker
Thank you for posting this! I was googling the ‘code appearing in square brackets’ and found this very helpful post!
{ 1 trackback }