Getting Theme URL In WordPress

Posted on June 11, 2022June 11, 2022 by J OWL Farand

If You wish to retrieve a template’s directory URI for the active theme, use

get_template_directory_uri()

Using get_template_directory_uri() to link a static image with its correct path in html :

1<img src="<?php echo get_template_directory_uri(); ?>/images/logo.png"width=""height=""alt=""/>

Source

Posted in #downloadTHISweb, download this webTagged #wordpress, wordpress

Post navigation

Previous: Adding An Event Listener To Multiple Elements With JavaScript
Next: Reusable Cursor Hover Function In JavaScript
Proudly powered by WordPress | Theme: ghostnation by J. OWL Farand.