Image widgets linking to an external site in a new tab

Community Forums Forums General Discussion Image widgets linking to an external site in a new tab

This topic is: not resolved

This topic contains 2 replies, has 2 voices, and was last updated by  chikamiku 1 year, 3 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #43039

    chikamiku
    Participant
    Post count: 66

    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?

     

    Thanks

    #43562

    bmaven
    Participant
    Post count: 44

    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!


    Blogging growth strategist & revenue coach at The Blog Maven, fearless leader of 3 preschoolers…tweeting it up @theblogmaven

    • This reply was modified 1 year, 3 months ago by  bmaven.
    • This reply was modified 1 year, 3 months ago by  bmaven.
    #46322

    chikamiku
    Participant
    Post count: 66

    bmaven,

    Thanks for this. I appreciate the big help.

     

    Regards,

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.