wp get theme directory path code example
Example 1: get theme folder path in wordpress
echo get_stylesheet_directory_uri();
Example 2: get theme path in wordpress
include( get_template_directory_uri() . '/includes/my_file.php' );
Example 3: how to get template path in wordpress
function get_template_directory_uri() {
$template = str_replace( '%2F', '/', rawurlencode( get_template() ) );
$theme_root_uri = get_theme_root_uri( $template );
$template_dir_uri = "$theme_root_uri/$template";
return apply_filters( 'template_directory_uri', $template_dir_uri, $template, $theme_root_uri );
}