phpwordpress

How can I get the image URL in a WordPress theme?


I am developing a theme for WordPress. And I have many images in images/ folder. But when I take the page in browser it is not coming.

My code is:

index.php

<ul>
<li><a href="#"><img src="images/mindset.jpg" width="145" height="32" /></a></li>

Is there any function for getting the image path in WordPress?


Solution

  • src="<?php echo base_url()?>your_theme_dir/image_dir/img.ext"
    

    As well

    src="<?php bloginfo('template_url'); ?>/image_dir/img.ext"