Inspiration For Creative Minds
Home » Labs » Get template directory path in WordPress  

Filed under Labs

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
?>
It's only fair to share...Share on Google+Tweet about this on TwitterShare on Facebook
Labs

Posts you may like: