Version 4.x

(Last updated for Version 4.0

About Version 4.x

The Shortening functionality of the URL Shortener WordPress Plugin has been completely re-written once again to provide a cleaner code base as well as provide for easier expansion in the future. It also brings with it small functionalities such as QR Code display.


View Guide

Shortener Services


    • (beta)
    • tinyurl
    • snipurl / Snurl / Snipr / /
    • smsh (aka sm00sh)
    • Voizle 
    • Interdose API
(Note: Support level is tiered. For more information, check FAQ)


    • Digg (They have stopped the service)
    • (Service no longer available)
    • Cuthut (Service no longer available)
    • (Service no longer available)


Initial Setup

    1. Upon plugin activation, go to Settings > URL Shortener to select your options

    2. Shortlinks / Short URL will now be automatically generated for all posts/pages using the selected shortening service.

Bulk Deleting

  1. You can also bulk delete Shortlink / Short URLs 

Template Tags

On demand shortening of URL

      • fts_shorturl($url, $service, $output = true, $key='', $user='')
      • Parameters:
        • $url: the url to be shortened
        • $service: the name of supported url service
        • $output (optional): if set to false, result will be returned instead of echo’ed
        • $key (optional): User API key
        • $user (optional): Username

      • Eg: <?php fts_shorturl('', 'bitly'); ?>

Displaying Post / Page shortlinks

      • Option 1: (for WP 3.0 and above)
        • <?php the_shortlink(); ?>

      • Option 2 (used within the Loop)
        • fts_show_shorturl($post, $output = true)
        • Parameters:
          • $post 
          • $output (optional): if set to false, result will be returned instead of echo’ed
        • Eg: <?php fts_show_shorturl($post); ?>


    • Usage Variations:
      1. [shortlink]
      2. [shortlink name="display name"]
      3. [shortlink url="http://localhost"]
      4. [shortlink name="display name" url="http://localhost"]
      5. [shortlink]http://localhost[/shortlink]
      6. [shortlink service="bitly"]http://localhost[/shortlink] 
      7. [shortlink qr=1]
    • Parameter descriptions
      • name: Link Text 
      • url: The URL that needs to be shortened
      • service: URL service to use
      • key: user pass/key
      • user: username
      • qr: show qr code instead of link

    • Caveat: Try not to combine usage variations

Settings and Options


Main Settings

      • URL Shortener Integration
        • When enabled, Shortlink /Short URLs will be generated upon post / page publishing.
        • It doesn’t affect the Nice ID URL option.

      • Use Permalinks for Short URLs
        • When enabled, permalinks will be used to generate the shortlinks
        • By default, shortlinks are generated using http://your_site/index.php?p=123 as this will ensure shortlink will work regardless of page permalink or slug.

      • Append Short URL to
        • Choose whether to append a link to the generated Short URL to homepage, individual post page or individual site pages.

      • Text before Short URL link
        • Provide a pre-text before the Short URL

URL Service Configuration

      • Configure your preferred URL Shortening Service. 
      • Services which require authentication will be marked with a red asterisk *

Note: Above screenshot is the interface for Version 3.0. It has been slightly modified in 3.1.1 and 4.0

Additional Features

Nice ID

      • Nice ID URLs
        • When enabled, allows use of http://your_site/123 instead of the usual http://your_site/index.php?p=123 or http://your_site/index.php?page_id=123
        • Formally named template URL, but redirection method has been changed.

      • Nice ID URL Prefix
        • This prefix will be added to your Nice ID URLs... default is / 


      •  Disable Shortcode [shortlink]
        • Provides the option to disable the shorturl shortcode in the event that it conflicts with other plugin's shortcode of the same name

Qr Code

      •  Append QR Code to
        • Choose whether to append the qr code to homepage, individual post page or individual site pages.
      • Text before QR Code
        • Provide a pre-text before the QR code


There are no settings in this section. It's just a list of modules included in the plugin. 
This portion may expand in the future.

Action and Filters

fts_use_shortlink (Action Hook)

    • Parameters:
      • $post_id
      • $shortlink: Generated shortlink

    • Example Usage:
    function duplicate_field($post_id, $shortlink){
        add_post_meta($post_id, 'duplicate', $shortlink);
    add_action('fts_use_shortlink', 'duplicate_field', 10, 2)

      • The above code snippet will add another custom field with your shortlink/shorturl to your post

fts_filter_shortlink (Filter)

    • Parameters:
      • $post_id
      • $shortlink: Generated shortlink