WP: insert images in wordpress template

Display automaticaly images in wordpress template without “/wp-content/themes/the_theme” In wordpress theme coding becouse of the css stylesheet and the order of the template, images inserted into html files must have the precise like:

wp-content/themes/your-theme/images/image.png

This problem can be solved very easy in an elegant way, by replacing “wp-content/themes/the_theme” patch with:

<?php bloginfo('template_directory'); ?>/images/midCol/search.png

You can integrate it like:

 
<img src="<?php bloginfo('template_directory'); ?>
/images/post/comment.png" alt="comment" width="20" height="20">

Leave a Comment

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>