19 Feb, 2010

WordPress: make a short urls

Posted by: admin In: Wordpress|php

Today, services like Twitter impose the use of short URL, certainly in the network there are several free services, but if we want something we can use custom WordPress to create a dedicated service to our blog. The trick is to exploit the demand for each item, calling for his ID stored in the database.

In part we can put this piece of HTML code to display a link to “short”.

<?php echo get_bloginfo('url')."/?p=".$post->ID; ?>

No Responses to "WordPress: make a short urls"

Comment Form