Auto-link WordPress Custom Field URLs

The Amazing make_clickable() WordPress Function!

Have you ever had a WordPress custom field that might have a url in it?  For years, I have been toiling with crazy regular expressions and javascript hacks to dynamically add links to custom field text.

Well, no longer!

Today, I discovered the make_clickable() WordPress function.

This simple, little function finds text urls and converts them into hyperlinks, like so:

make_clickable(get_post_meta( get_the_ID(), 'key_1', true ));

Pretty cool, eh?

Posted in

Toby Cryns

Toby Cryns is a freelance CTO, expert WordPress consultant, and teacher.

He offers free advice to improve your freelance biz.

He also publishes small droppings every now and then to and

Follow Toby's contributions on Github and