Skip to content

WPShout Newsletter

Sign up for news, tips, and insights to help you build better websites.

Newsletter - Top banner

Write Faster With WordPress’ Shortcodes

Tired of typing the same links, phrases, or contact details over and over in your WordPress posts? Shortcodes can dramatically speed up your writing by letting you insert predefined content with just a few keystrokes.

Shortcodes for Speed

Shortcodes are simple shortcuts that let you insert complex content by typing something like [email] or [bio]. Here’s how they work in practice. On WPShout, whenever I write [wp] it automatically becomes a link to our homepage. Instead of typing out the full HTML link every time, I just type [wp] and WordPress outputs <a href="https://wpshout.com">WPShout</a>.

Another example – if I type [courses] WordPress outputs <a href="https://courses.wpshout.com/">WPShout Courses</a> – a link to our courses platform. This allows me to quickly cross-promote other sections of the site and link to other pages with minimal effort on my part.

More Time-Saving Examples

Once you start thinking about shortcodes as writing shortcuts, you’ll spot opportunities everywhere:

  • [disclaimer] for legal text you use frequently
  • [social] to add all your social media links at once
  • [address] or [phone] for consistent company information
  • [bio] for your standard author bio line

Creating Your Own Shortcode

Setting up your own time-saving shortcodes is easier than you might think. I recommend using the Code Snippets plugin rather than editing your theme files directly – it’s safer and your shortcuts won’t disappear when you update your theme.

First, install the Code Snippets plugin from your WordPress admin. Then create a new PHP snippet with code like this:

function my_email_shortcode() {
    return 'contact@example.com';
}
add_shortcode('email', 'my_email_shortcode');Code language: JavaScript (javascript)

Save and activate the snippet, and now whenever you type [email] in any post or page, it’ll automatically insert your email address. You can create as many of these as you want using the same pattern – just change the function name, the returned content, and the shortcode name.

Here’s our full guide on how to make your own shortcodes.

When Should You Use Them?

Shortcodes are perfect when you find yourself repeatedly typing the same things:

  • When you reference the same external links multiple times across posts
  • For inserting boilerplate text or legal language consistently
  • When adding your contact information or social links
  • For maintaining consistency in how you format certain elements
  • Any time you’re copy-pasting the same content repeatedly

Rather than hunting through old posts to copy and paste that perfect phrase or link, you can have it at your fingertips with just a few keystrokes. Your writing flow stays smooth, you avoid typos from retyping, and you maintain consistency.

They save an awful lot of time. Useful little things.

Yay! 🎉 You made it to the end of the article!
Alex Denning
Share:

3 Comments
Most Voted
Newest Oldest
Inline Feedbacks
View all comments
Ahorrar tiempo en WordPress con atajos | Marcial Soto
January 9, 2010 6:59 am

[…] al ingresar en el post el shortcode marcialsoto.com. Fácil, ¿no?1 Este truco lo he aprendido de WPShout […]

wordpress shortcodes kick ass (or: shortcodes, an affiliate marketer’s best friend) | jazzsequence
December 14, 2009 7:11 pm

[…] always posts awesome tips, tricks, and hacks for WordPress.  you can take a look at his post Write Faster with WordPress Shortcodes for another explanation of how they […]

jazzsequence » » wordpress shortcodes kick ass (or: shortcodes, an affiliate marketer’s best friend)
December 14, 2009 4:55 pm

[…] always posts awesome tips, tricks, and hacks for WordPress.  you can take a look at his post Write Faster with WordPress Shortcodes for another explanation of how they […]

Or start the conversation in our Facebook group for WordPress professionals. Find answers, share tips, and get help from other WordPress experts. Join now (it’s free)!