WordPress.org

Ready to get started?Download WordPress

Forums

Putting a Link in an Image Caption (10 posts)

  1. mattloak
    Member
    Posted 4 years ago #

    I want to provide credit for an image by putting a link inside the image caption however wordpress keeps stripping the link out when it's published. What's going on here?

    I did a google search and found tons of people with the problem and no reasonable solutions. I was baffled to find little to no mention of this problem in the forums. I don't know if I'm doing something wrong or what.

  2. xdesi
    Member
    Posted 4 years ago #

    If you go to the HTML editor tab after adding the caption can you not add the link around it then?

  3. mattloak
    Member
    Posted 4 years ago #

    I can add the link but it gets stripped if I switch between the visual and the html editor and even if I don't switch, it gets stripped when I publish.

  4. gervaisjf
    Member
    Posted 4 years ago #

    I'm having the same problem. Anyone found a solution? Seems like a ridiculous little thing to not be able to get beyond this.

    ** Edit **

    just found this : http://forum.bytesforall.com/showthread.php?t=1494
    It works but the whole caption is going to be an anchor text.

  5. marc0047
    Member
    Posted 4 years ago #

    +1

    Please allow me to place a link on any set of words in the caption. This is still happening in WP 2.9.2.

  6. alchymyth
    The Sweeper & Moderator
    Posted 4 years ago #

  7. marc0047
    Member
    Posted 4 years ago #

    This seems like the definitive method to add links to captions without extra coding or any plugins:

    1. Enter HTML mode
    2. Add link in the caption="[...]" markup
    3. Be sure that the link is applied with a single (') quote NOT a double (") quote. If a double quote is applied WP cleans it out.

  8. Zack Katz
    Member
    Posted 3 years ago #

    I just created a plugin called Links in Captions that makes it easy to add links to captions!

    It uses the following formatting: {link url="http://www.example.com" target="_blank" rel="nofollow"}Anchor text here{/link} and works great in Visual and HTML editors.

  9. jfrenaye
    Member
    Posted 3 years ago #

    Zack-- I downloaded it and could not get it to work. Is this really a plug in or are you just offering the code to do it?

  10. Zack Katz
    Member
    Posted 3 years ago #

    @jfrenaye - Yes, it's a plugin - you should simply need to upload and activate the plugin, then use the syntax I mentioned above.

Topic Closed

This topic has been closed to new replies.

About this Topic