How to associate the address of a webpage with an image in the right sidebar

  • Unknown's avatar

    Hello,

    I’m using Tortuga and I uploaded an image in the right sidebar of the homepage by entering the following code in the Additional CSS:

    <div class=”wp-block-image”><figure class=”alignleft size-large”></figure></div>

    Now, I’m looking for a working code to associate the address of a webpage with the image, so that I can click on the image with the cursor and open the webpage.

    I tried with several codes already, but to no avail. Could you please help me out?

    Thank you very much,
    Enrico

  • Unknown's avatar

    Hi Enrico,

    I think perhaps the easiest way to create an image link in a sidebar widget would be to use an image widget, linking it to the page as described in the Adding an Image section of the Image Widget support page where it says:

    To link the image to an external URL, under Display Settings pick “Custom URL” from the drop down next to link to. A box will appear for you to type in the URL you’d like the image to link to. Once you have the URL set, you can click “Add to Widget” and the image linking to the custom URL will be added.

    There’s an example of an HTML code with an image link in the Text Widget Links support page, without any explanation as to how to create it.

    The basic form of an HTML or text link is

    <a href="link URL">link text</a>

    For an image link, the link text in the above code is replaced by an image URL, so you get the basic format

    <a href="link URL"><img URL></a>

    I don’t know how to do it with the Additional CSS code you’ve mentioned above. Maybe someone else will respond to that. You may call for staff attention by adding a “modlook” tag to the sidebar of this topic.

  • Unknown's avatar

    It is the easiest way indeed!

    Thank you much

  • Unknown's avatar
  • The topic ‘How to associate the address of a webpage with an image in the right sidebar’ is closed to new replies.