December 3, 201213 yr Hi, I'm trying to hard-code a image into a custom wordpress theme I'm developing, but the blimming thing won't show! Its strange because if I call images using the css background-image tag, they show fine, but I'm using the following code and it its just not showing. here's my html/php: <a href="<?php echo get_option('home'); ?>"> <img src="<?php bloginfo('template_directory'); ?>test1.jpg" alt="test image" /></a> The alt description shows, but no image. the image file is in the same folder as the php files. What am I doing wrong? I've been fighting the blimming thing all afternoon!
December 3, 201213 yr <?php echo trailingsla****(get_template_directory_uri()); ?>test1.jpg ...although really it would be neater as: <?php echo trailingsla****(get_template_directory_uri()); ?>images/test1.jpg Edited December 3, 201213 yr by Renaissance-Design
December 3, 201213 yr Author OK, Tried that and all it does is output the path to the image, not display the image itself, heres the code I used (I took your suggestion and created a images folder) <?php echo trailingsla****(get_template_directory_uri()); ?>images/test1.jpg
December 3, 201213 yr Sorry, I meant to dump that in the code you posted: <img src="<?php echo trailingsla****(get_template_directory_uri()); ?>images/test1.jpg" alt="test image" /></a>
Create an account or sign in to comment