Here’s How to Add Links Inside WordPress Image Captions

This is the 2nd or 3rd time I’ve looked for a solution to the WordPress issue that it strips HTML out of image captions, removing any links you might have included. I finally found an answer, and it seems to work great: yes another plugin. Links in Captions allows you to add link code like this to image captions: {link url=”http://www.example.com”}Anchor text here{/link} and it renders them as normal text links!

Update: this has been fixed in WordPress core. You can now do this the way you would expect, just add an “<a href=” HTML tag into the caption around the text you want to link.

2 Comments

  1. Susanna Miles - K.i.s.s Wedding Ideas on 7 March 2011 at 6:24 PM

    I’ve just installed this plugin and my links are still being stripped? Am I supposed to change something manually?

  2. Tevya on 7 March 2011 at 6:31 PM

    Did you format it with braces and the text I showed in the post? {link url=”http://www.example.com”}Anchor text here{/link} Also, you’ll want to do it in the “caption” field of the image properties, not in the Post interface.

Leave a Comment





This site uses Akismet to reduce spam. Learn how your comment data is processed.