X

Get template directory path in WordPress

Adding below code to your WordPress theme will automatically generate the file path to your template directory.

 
	<?php bloginfo('template_directory'); ?>

Common Usages

 
<?php
	get_stylesheet_directory(): // file path to current Theme directory
	get_stylesheet_directory_uri(): // url path to current Theme directory
	get_template_directory(): // file path to parent Theme directory
	get_template_directory_uri(): // url path to parent Theme directory
?>