mattloak
Member
Posted 2 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.
If you go to the HTML editor tab after adding the caption can you not add the link around it then?
mattloak
Member
Posted 2 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.
gervaisjf
Member
Posted 2 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.
marc0047
Member
Posted 2 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.
marc0047
Member
Posted 2 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.
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.
jfrenaye
Member
Posted 1 year 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?
@jfrenaye - Yes, it's a plugin - you should simply need to upload and activate the plugin, then use the syntax I mentioned above.