Scroll to top

How to get the url of current theme?

Author
Conversation
Share on facebook
Share on google
Share on twitter
Share on linkedin

Getting the URL to the Current Theme

To grab the current theme directory’s URL, you can use the template_url parameter. This makes your WordPress themes more flexible so that when you change the domain name or use it in multiple domain names you don’t have to worry about changing anything that references the theme’s location. You can use this parameter a number of ways, such as for referencing custom external stylesheets, images, and JavaScript libraries that are inside the theme directory.

<?php bloginfo('template_url'); ?>
envato iconUpwork Profile