By
05/13/2016   Comments Off on Get the url to your theme directory

View all snippets

<?php echo get_stylesheet_directory_uri(); ?>

Here is a usage example for grabbing an image from your theme files’ image directory:

<img 
src="<?php echo get_stylesheet_directory_uri(); ?>/img/imagefile.jpg" 
alt="image-title" 
width="100" 
height="50" />