When you put some URL and email address you need to manually add the link URL to that text. This action always takes the some time of wordpress blogger. WordPress has facility to add the links to your URL and email address automatically.


convert plain text URI to HTML links in wordpress

This facility is available in wordpress since wordpress 2.7 version but many wordpress theme and plugin developers never used this functionality.

WordPress provides the make_clickable() function for convert plain text URI to HTML links. This function able to convert URI, www, ftp, and email addresses. Finishes by fixing links within links. You just need to pass the string parameter to this method.

More detail information you can find in following file.

You can use this method in your functions.php file also. Use the following code.

add_filter('the_content', 'make_clickable');

By using this code you are able to covert the URI, www, ftp, and email addresses in to link.

If you are having any issues or question about make_clickable method then please write to me.

Written by WPAPI

My name is Purab Kharat, Here is my Personal Blog: digcms.com. Work as an Senior Technical Lead at Smartsourcing Global Pvt Ltd in Princeton, NJ, USA. I contributor of many wordpress plugins and Drupal Modules. I am core developer of Drupal. Connect to purab on LinkedIn or Follow @purab on Twitter or Follow me on Google+ or Write Mail to purabdk@gmail.com or Chat with me on Skype : purabdk

This article has 5 comments

Leave a Comment

Your email address will not be published. Required fields are marked *