Forums

How to add cllickable image to widget that opens a new tab and new page? (6 posts)

  1. AJHackett
    Member
    Posted 1 year ago #

    I'm new and don't know HTML but I'm digging in and trying. I need the code to do this correctly.

    I want to add an image to a text widget. The image should be clickable and when selected, a new tab opens with the new page.

    Thanks for any help.

  2. fluffybunnies82
    Member
    Posted 1 year ago #

    That's easy! :)

    <a href="LINK URL HERE" target="blank"><img src="IMAGE URL HERE"></a>

  3. AJHackett
    Member
    Posted 1 year ago #

    Thanks for the code. It didn't work.

    <img src="http://coachmitch.com/public_html/wp-content/uploads/images/3010_Albany_St.jpg">

    URL=www.CoachMitch.com

  4. AJHackett
    Member
    Posted 1 year ago #

    Sorry, my bad. Ignore previous post. This is the complete code that didn't work
    target="_blank"><img src="http://coachmitch.com/public_html/wp-content/uploads/images/3010_Albany_St.jpg">

    URL = http://www.CoachMitch.com

  5. AJHackett
    Member
    Posted 1 year ago #

    WP didn't print the full code the last 2 times. I don't know why. I hope the third time is the charm.

    NOTE the 2 previous posts take you to the target page that I want the clickable image to go to. I am taking away the initial open delimiter < so that WP does not turn this post into a link.

    a href="http://coachmitch.com/about/about-each-deal/100-house/"> target="_blank"<img src="http://coachmitch.com/public_html/wp-content/uploads/images/3010_Albany_St.jpg">

    URL = http://www.CoachMitch.com

  6. alchymyth
    The Sweeper
    Posted 1 year ago #

    WP didn't print the full code the last 2 times. I don't know why. I hope the third time is the charm.

    please use the 'code' button to mark your code and keep it readable;

    method:
    - type/paste your code, then highlight it and press 'code' button once;
    or
    - press 'code' button, then write/paste your code, then press 'code' button again.

    for any code longer than 10 lines, please use the http://pastebin.com/

    regarding your problem:

    copy closely what @fluffybunnies82
    suggested, particularly the position of the >

    your code should look like:

    <a href="http://coachmitch.com/about/about-each-deal/100-house/" target="_blank"><img src="http://coachmitch.com/public_html/wp-content/uploads/images/3010_Albany_St.jpg"></a>

    http://www.w3schools.com/html/html_links.asp
    http://www.w3schools.com/tags/att_a_target.asp

Topic Closed

This topic has been closed to new replies.

About this Topic