I would like to display a image (stored on my own website) in a text widget.
I typed the following code in a text widget in the wp-admin interface:
<b>See on the map</b> <br> <i>Get Directions</i>
<IMG SRC="<?php
bloginfo('template_directory'); ?>/buon-appetitoDrottingatan.jpg"
ALT="Buon Appetito!" WIDTH=170 HEIGHT=130px>
<br>Drottingatan, 67 Stockholm, Tel: 08-11-22-33
But the picture is not displayed. What is the path to the text widget?
Thanks in advance
you cant use php inside the text widget you will have to hard code the img straight into it.
ie:
either that or host the file on a image hosting site and link through from that..
If you want to use the php code you posted in a sidebar or any future code snipets you can do such with the following wordpress plugin:
http://wordpress.org/extend/plugins/php-code-widget/
you can use your code. This is practical if you have a big chunk of code.