You are here: WTF » Documentation » Extended Functionality Methods »

TinyURL

TinyURL

WTF provides you with a simple way to create a TinyURL of your WordPress posts and pages. This is a small function which simply returns a TinyURL for the passed in URL. To use the tinyURL function add the following code anywhere in you site:

<?php if(function_exists('wtf_tiny_url')) echo wtf_tiny_url(get_permalink()); ?>

Note in the above example I am using the default WordPress function get_permalink() to get the URL of the post.

Advanced

This method takes one argument:

wtf_tiny_url($url);
  • $url
    • Description – The long URL that you want to shorten using TinyURL.