- This topic has 2 replies, 2 voices, and was last updated 10 years, 3 months ago by .
- The forum ‘General Discussion’ is closed to new topics and replies.
These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.
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!
© 2023 WPEngine, Inc.