WordPress shortcodes are small pieces of code used in the functions file that allow you to quickly add frequently used content to a post or page.
The shortcode API has been part of WordPress since version 2.5.
Here I’ve rounded up 8 interesting and very useful WordPress shortcodes. A couple of them are ones that I’ve written about before.
- WordPress Gallery Shortcode – How to use the built-in WordPress Gallery Shortcode to display a simple image gallery.
- Display a commonly used link – Using a WordPress shortcode you can easily display a frequently used URL.
- How to add a RSS Feed to a Post or Page Using a WordPress Shortcode – Code used to create a shortcode to display a RSS feed on a post or page.
- Using Shortcodes To Hide Content From The Public – This shows you to add a shortcode that will only display content to logged in members of your site.
- A simple paypal donation link – You only need to change the paypal email in the code and this shortcode will add a simple paypal donation link to a post of page.
- Display Related Posts – Many of us use a plugin to display related posts at the end of each article. This shortcode will allow you to add related posts without the use of a plugin.
- Google Maps Shortcode – This one is pretty cool – a shortcode that will insert a google map into a post or page.
- Send to Twitter – how to create a tweet or send to twitter link with a shortcode.
Do you any favorite WordPress shortcodes that you would add to this list?
photo credit: Atelier Vanessa Maurer
Dot says
Oh, so that’s what short codes are.
Hope you’re managing okay with all the snow. Are they good at cleaning it up in Philadelphia?
.-= ot´s last blog ..Comment on The Blizzard, Day 2 by Barbara Swafford =-.
Kim Woodbridge says
Hi Dot – We got about 2 feet – I think there was a lot more down your way. Schools were closed today, which I thought was unnecessary. They are saying we might get another foot starting tomorrow so my guess is that school will be closed on Wed.
Since I don’t drive or have any shoveling responsibilities I’m not bothered by the snow – I like it. And I love how quiet it is while it is snowing.
vered - blogger for hire says
Thanks… and I love the photo. :)
.-= vered – blogger for hire´s last blog ..Post Baby Body: Stop it Already! =-.
Kim Woodbridge says
Hi Vered – I found a lot of funny photos when searching on the keyword short but most of them weren’t appropriate to use. :-)
Dennis Edell says
The commonly used link is awesome. Kinda like a modern day macro, yes?
.-= Dennis Edell´s last blog ..Here We Go! Theme Construction Part 1 – Your Participation Is Wanted-Needed! =-.
Dennis Edell says
Anyone needing to ask what a macro is, please do it privately…I hate looking so old in public. LOL!
.-= Dennis Edell´s last blog ..Here We Go! Theme Construction Part 1 – Your Participation Is Wanted-Needed! =-.
Kim Woodbridge says
HI Dennis – That’s exactly right – it’s like a macro for WordPress. Don’t the Office programs still use them?
Dennis Edell says
Probably.
.-= Dennis Edell´s last blog ..Here We Go! Theme Construction Part 1 – Your Participation Is Wanted-Needed! =-.
Ajith Edassery says
Thanks again for your little facebook helpers Kim. I am still going slow on the fan page thingie and other fb experiments due to hectic work life. This year, I plan to invest some good time with my facebook experiments and marketing.
.-= Ajith Edassery´s last blog ..Making Money Online in India gets tougher =-.