I’ve tried without success to hard code images in WordPress pages. The last thing I want to do is use a complete url to the image, I’d rather have it point if possible to my current theme. I’m doing this in the backend of WordPress by writing and editing a page.
So for example, I have this image that I want to hard code:
<img src="/images/everybody_dancing_home.jpg" alt="weddings" />
i’ve tried adding some php to the image tag:
<img src="<?php bloginfo(‘template_url’); ?>/images/everybody_dancing_home.jpg" alt="weddings" />
However, when I look at my source code I see this:
<img src="<?php bloginfo(‘template_url’); ?>/images/everybody_dancing_home.jpg” alt=”weddings” />
So it looks like the character code is messed up, but when I look in my WordPress page everything appears normal. I’ve also written it out by hand a few times just to check.
I can’t point you to a site because I’m doing this on a local web server, but any help would be greatly appreciated!
Have you installed the Exec-PHP (http://wordpress.org/extend/plugins/exec-php/) Plug-in? I don’t believe you can use PHP in your posts or pages without it installed. I know that it has allowed me to do exactly what you’re wanting to do when I’m linking to items in my posts and pages.