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:
[html]<a href="LINK-URL" target="_blank"><img src="IMAGE-URL-FROM-MEDIA-LIBRARY" /></a>[/html]
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.
Are you a blogger, web designer, developer, or website owner looking to generate more income?
Promote products for the largest and fastest growing online website platform as part of our affiliate program.