Adding images to your sidebar

If you want to add images to your WordPress sidebar and are struggling with out of date widgets, etc – provided you know the url of your image, you can quickly and easily code it yourself by adding a ‘text widget’ to your sidebar, like so:

<img src="{image-url}" alt="{description}" width="150" />

To make your image an active link (provided you know what url to point to) you can do it like this:

<a href="{link-url}" target="_blank">
  <img src="{image-url}" alt="{description}" width="150" />
</a>

KEY:
{image-url} = http://blog.com/wp-content/uploads/2009/08/foto.jpg
{description} = my nice picture that I took on holiday
{link-url} = http://photo-gallery.com/tony/hols/2009snaps

EXAMPLE:

<a href="http://tony-jennings.com/index.php/gliding" target="_blank">
  <img src="http://tony-jennings.com/wp-content/uploads/2009/DSC00604-300×225.jpg"
    alt="Me in my glider" width="150" />
</a>

produces this:


Me in my glider

Leave a Comment