I am new to WordPress and I've seen this term passed around.
3 Answers
"Shortcode" is a user friendly way of inserting various WordPress plugins/scripts into a page without having to know a lot of fancy HTML/JavaScript/PHP in order to make it happen.
Take, for example, embedding an mp3 file into a post on a hosted WordPress site. Instead of having to setup the proper code for a flash player or fiddle with some fancy JavaScript, you can use the following shortcode in the editor. You don't even switch to HTML mode...
[audio: http://www.pathtomyaudio.com/song.mp3]
...and WordPress does the rest for you.
You'll find a lot of plugins for WordPress (such as Contact Form 7 and others) use this convention.
-
3For another example, the simple shortcode
[gallery]
inserts a nicely formatted grid of all of the images attached to a post. It has several optional parameters but it can be used just as I typed it.– AndyCommented Mar 30, 2011 at 18:36
Not long ago i posted a nice explanation: Shotcodes because its shorter! It covers in short:
- What shortcodes are.
- How to use shortcodes.
- How to define your own.
- How to use them in widgets.
Worth a look.
These are WordPress.com specific shortcodes, but they give you an idea of the power of using them.