Codex tools: Log in
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.
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 ); ?>
get_query_template() is located in