A quick tip on how to get the current wordpress theme image path when referencing images on your theme php or css files.
|
1 |
<img src="<?php bloginfo('template_directory'); ?>/images/mainimage.jpg" title="" alt="" /> |
That’s all there is to it. The bloginfo(‘template_directory’) function will return the current theme path, and appending the “image” folder positions you right folder.
Read more





