Make URL Clickable In WordPress

Make URL Clickable In WordPress
Make URL Clickable In WordPress

Sometimes, you blog post contains many links (for example a download page), then it wastes a lot of time if you make each link clickable manually. Fortunately, WordPress has a built-in function that can help us to convert every URL in plain text into a clickable link.

This function is make_clickable(). It works with URI, www, ftp, and email addresses. So, to linkify post content, just add the following code into your functions.php file:

add_filter('the_content', 'make_clickable');

You might want to read more about the make_clickable() function at the Codex.

If you want to linkify text outside WordPress, you can do it with PHP regular expressions. BuiltInternet has written a good article about this.

4 thoughts on “Make URL Clickable In WordPress

  1. Thanks for sharing this WP code. I have been looking for this for my web development project good thing you pop out on google 1st page.

Comments are closed.

Meta Box - The most lightweight yet powerful WordPress custom fields plugin Get It Now