How to automatically add tags in WordPress

When I’m writing a post in WordPress that contains photos, there are a lot of repetitive tasks. For example, just inserting a photo goes something like this:

  • copy the appropriate image URL from my Flickr page
  • switch back to WordPress’s HTML editing view my browser
  • type in all the opening formatting tags I want to use for each and every image
  • paste in the image URL
  • close all the tags

Since the clipboard can only hold one thing at a time, that adds up to a lot of repetitive typing, but I’ve cut almost all of it down to a couple of key strokes using PTFB Pro’s inbuilt macro recorder. Setting up the macro was straightforward – it boiled down to this:

  1. Record a macro that types the opening tags, uses CTRL+V to paste the contents of the clipboard, then types the closing tags and hits the return key
  2. Attach a memorable hotkey sequence to the macro to trigger it on demand.

As soon as I’d created the macro (step #1 above) I double-clicked it to make a couple of tweaks. On the Triggers page, I turned off the “Trigger spontaneously” option because I only want the macro to run when I tell it to. I then ticked the hotkey trigger, and chose the key sequence that would subsequently run the macro.

Trigger by hotkey

On this occasion I chose CTRL + SHIFT + I. Why? Well for me the “I” suggests “insert” and “image”, so it’s easy to remember, and combining it with CTRL and SHIFT together means that it’s very unlikely to clash with hotkeys used by any other software on my computer.

Now, pasting and formatting a photo in a WordPress post comes down to this:

  • copy the Flickr URL to the clipboard
  • switch to the WordPress HTML view
  • hit CTRL+SHIFT+I

That’s a lot less typing, and it frees me from having to remember the tags I want to use. I can write the post faster not only because of the time saved by typing less, but also because I can keep my concentration going on the content of the post rather than the editing process.

If I’d wanted I could have added more into the macro – for example I could have switched to the WordPress HTML view automatically. In this case I decided to keep it simple; I’ve found that unless I’m creating a throw-away macro for a huge one-off editing job it’s better to keep the macros small and clean. The same principle applies in writing software; keep each function small, self contained and free of side effects and they’re a lot easier to reuse!

Find out more about boosting your productivity with autoclicks and macros.
CLICK HERE to download a free 30 day trial, no strings attached. If you aren’t entirely happy simply uninstall!