badget

Biggest Sale! Special Offer!

Get 30% discount on all of our single themes with this coupon code: #30%SALE

Hurry up! *Limited time offer*

Inserting an image link in a text widget

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #48501
    Webmaster
    Participant

    Hi,
    I’m sorry for all the new questions, but I’ve just purchased Ambition Pro and am trying to totally redo an old HTML website using WordPress. I looked at a lot of themes, and was hoping that yours would work for me. My development site is as http://www.opcaaw.com/wordpress/

    I have two widgets that I want to put in my normal sidebar. One is from my calendar plugin showing the next four events on our calendar. The other is a text widget into which I would like to insert the html code to create an image link showing the front page of our organization’s newsletter with a link the the pdf of the newsletter online. In the example, the image of the front page is a 302×302 image stored in my media library. It has a permalink as follows: http://opcaaw.com/wordpress/?attachment_id=100

    When I use the following code to create the image link in the widget text box, however, the image does not load into the box:

    I must be missing something, but I’m not sure what it is. Your help would be appreciated.

    Jeff

    #48512

    Hi Jeffrey,
    Add image in this way to display
    <a href="http://opcaaw.com/wordpress/wp-content/uploads/nov16front.jpg"><img width="300" height="300" src="http://opcaaw.com/wordpress/wp-content/uploads/nov16front-300x300.jpg"></a>

    Thank you

    #48516
    Webmaster
    Participant

    Thank you for your quick response. That code worked.

    Is there a reason why the permalink for the image file would not work in this situation?

    I’m trying to learn all I can so that I will be able to understand how to do things like this in the future.

    Jeff

    #48517
    Webmaster
    Participant

    Oh, just on addition. The code you provided pointed the link to the image, not to the document that was in my original code. I did realize that and make the change so the code points to the pdf, not the jpg.

    Wanted you to know that it wasn’t plug and play.

    #48518

    Hi Jeffrey,

    The pdf link will not be displayed. So you add image link inside image source and on your anchor tag you add link to your pdf file. Below is the example where you point pdf link inside <a href=""> tag and inside <img src> you add image link
    <a href="http://yourpdffilelink"><img width="300" height="300" src="http://opcaaw.com/wordpress/wp-content/uploads/nov16front-300x300.jpg"></a>

    Thank you

    #48525
    Webmaster
    Participant

    That’s exactly what I had done. When the code you suggested didn’t point to anything, I made the following change and it works fine:

    Thanks.

    #48567

    That’s great jeffrey

    Thank you

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.