Help with Wordpress Images in Sidebar

by 4 replies
5
Hi

I am trying to link an image in my sidebar, it is inside a text widget, to my affiliate link. Making the image clickable is what I am after.

I uploaded the image through the media library and it is displaying inside a white box, it would be nice to remove this box to, if possible.

Any ideas on how to do this?

Thanks
#programming #images #sidebar #wordpress
  • Your theme may be adding the white box around the image automatically, though you can try to remove any style, class or id attributes from the img tag. In order to make it clickable, you need to surround the img tag with an anchor tag.

    For example:
    HTML Code:
    <a href="http://your-affiliate.link"><img src="http://path/to/your/imgae.jpg" /></a>
    • [ 1 ] Thanks
  • Thank you, got it to work!
  • Did the white box go away too? That happened to me recently and I used inline style tags to add a border:none property. But it looks like it has already worked out for you.
  • the white background is still there, no experience with style tags.

Next Topics on Trending Feed