How to Convert plain text URI to HTML links in wordpress themes

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.

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.
wp-includes/formatting.php.

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.

How to Convert plain text URI to HTML links in wordpress themes

How to Convert plain text URI to HTML links in wordpress themes

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

You may like following Articles!

  • http://www.songidentifier.com/ Tricia Banaag

    hi, it is not bad thought.. :-D

  • matt

    Thanks for this.

    How do I make the links dofollow?

  • matt

    Never mind…I found it in another post on your site. :)

  • http://ifoodlinks.com Pattie Dampier

    Interesting read, perhaps the best article iv’e browse today. We learn everyday cheers to you!

  • http://fluvely.com ad

    Hellow
    i am trying to add your code and let see if it works

    thank you

  • http://fluvely.com ad

    I put code and it works thank you sir

    very helpul