How to correctly use get_template_directory_uri() WordPress function to load an image that is in a subfolder of my theme?

I hope it will work:

<img src="<?php echo get_template_directory_uri(); ?>/assets/img/flexslider/flex-1.jpg" />

If your assets folder inside theme.

Leave a Comment