Home » Labs » Get template directory path in WordPress  

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
?>

Posts you may like: