Add a clickable image in sidebar : WordPress

Ideally inserting a clickable image in the sidebar for a WordPress website can be accomplished by the Image Widget.

Image Widget is good and popular, but if you need to place just one image and do not wish to use the plugin for the same, here is another way to do the same

The code for clickable image

The image should already be present in your media library. Add a Text Widget to the side bar and insert the following code.

<a href=”” target=”_blank”><img class=”aligncenter” src=”” alt=”Start Blog Writing” /></a>

href gives its the link to reach on click, target specifies it to open in a new window. SRC gives a link to the image in the media library.

The code inserted in a text widget can be seen at the following URL

clickable image in sidebar

Leave a comment

Your email address will not be published.

CommentLuv badge
%d bloggers like this: