Hoping someone can answer this!
I'm using
<img src="<?php echo get_template_directory_uri(); ?>/images/image.jpg">
for my header and it is working. But when I try to use it in a sidebar text widget it won't show the image. Any ideas??
Thanks!
|
Hoping someone can answer this! I'm using
for my header and it is working. But when I try to use it in a sidebar text widget it won't show the image. Any ideas?? Thanks! |
|||
|
|
|
PHP code won't run inside of a text widget. There are plugins that will let you do that, but this type of thing is strongly discouraged. Add this code to your functions.php file, or better yet, make it a simple little plugin:
To use it in the admin, add the shortcode
|
||||
|
You can use a php widget, which is a plain text widget adapted to be able to execute php. See WordPress › PHP Code Widget « WordPress Plugins by http://ottodestruct.com |
|||
|
|
|
A simple solution would be to upload the image to media, and use the |
|||
|
|