How can I create image widgets which link to an external site in a new window?
Currently, I am using a Jetpack image widget. The image linking to an external site open in the same window. As a result of this, my website vanishes. How to handle that please?
The best way to do this is with a simple text widget and HTML. You would first upload the image to your Media Library (Media > Add New) and once uploaded, click "edit" beside the image. This will take you to a new page that has the URL of the image you just uploaded, listed on the far right side. Copy that URL (ctrl +C) to your clipboard.
In a new window, go to Appearance > Widgets, drag a new text widget into place in the sidebar, and add this code:
<a href="LINK-URL" target="_blank"><img src="IMAGE-URL-FROM-MEDIA-LIBRARY" /></a>
The target= part is what will make this open in a new window. Hope this helps!
You must be logged in to reply to this topic.
Subscribe to get early access to new themes, discounts and brief updates about what's new with StudioPress!