How to use get_template_directory_uri() to load an image that is in a sub-folder of my theme?

You should echo it and also you are closing your php tag improperly. View source the o/p generated to get some idea

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

or you can use bloginfo which is easier to remember and use (You need not echo)

<img src="<?php bloginfo('template_url'); ?>/assets/img/flexslider/flex-1.jpg"/>

Leave a Comment

techhipbettruvabetnorabahisbahis forumutaraftarium24eduseduseduedusedueduedueduseduedus