Languages: English • Italiano • 日本語 (Add your language)
Retrieve path to file without the use of extension.
Used to quickly retrieve the path of file without including the file extension. It will also check the parent template, if the file exists, with the use of locate_template(). Allows for more generic file location without the use of the other get_*_template() functions.
Can be used with include() or require() to retrieve path.
if ( '' != get_query_template( '404' ) ) include( get_query_template( '404' ) );
or the same can be accomplished with
if ( '' != get_404_template() ) include( get_404_template() );
<?php get_query_template( $type, $templates ); ?>
Since: 1.5.0
get_query_template() is located in wp-includes/template.php
.