Codex

Function Reference/get template directory

Contents

Description

Retrieve template directory Path for the current theme.

Note: Does not contain a trailing slash.

In the event a child theme is being used, the parent theme directory Path will be returned, use get_stylesheet_directory() to get the child theme directory Path.

Usage

<?php get_template_directory(); ?>

Parameters

None.

Return Values

uri (string) 
Template directory Absolute Path.

Notes

  • Uses: apply_filters() Calls 'template_directory' filter on template directory path and template name.

Change Log

Since: 1.5.0

Source File

get_template_directory() is located in wp-includes/theme.php.

Related

See also index of Function Reference and index of Template Tags.