How I can get theme URL in wordpress

Home / Wordpress / How I can get theme URL in wordpress

I want to get my wordpress theme URL to display image.Below is the code to get wordpress current theme URL.

This function will return the theme directory URL so you can use it in other functions:


Alternatively, this function will echo the theme directory URL to the browser:


So an example for an image in the themes images/headers folder would be:

<img src="<?php bloginfo('template_directory'); ?>/images/headers/image.jpg" />

Related Posts

Leave a Reply

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