get_singular_template

The timeline below displays how wordpress function get_singular_template has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 4.9

/**
 * Retrieves the path of the singular template in current or parent template.
 *
 * The template hierarchy and template path are filterable via the {@see '$type_template_hierarchy'}
 * and {@see '$type_template'} dynamic hooks, where `$type` is 'singular'.
 *
 * @since 4.3.0
 *
 * @see get_query_template()
 *
 * @return string Full path to singular template file
 */
function get_singular_template()
{
    return get_query_template('singular');
}

WordPress Version: 4.7

/**
 * Retrieves the path of the singular template in current or parent template.
 *
 * The template hierarchy is filterable via the {@see 'singular_template_hierarchy'} hook.
 * The template path is filterable via the {@see 'singular_template'} hook.
 *
 * @since 4.3.0
 *
 * @see get_query_template()
 *
 * @return string Full path to singular template file
 */
function get_singular_template()
{
    return get_query_template('singular');
}

WordPress Version: 4.3

/**
 * Retrieves the path of the singular template in current or parent template.
 *
 * The template path is filterable via the dynamic {@see '$type_template'} hook,
 * e.g. 'singular_template'.
 *
 * @since 4.3.0
 *
 * @see get_query_template()
 *
 * @return string Full path to singular template file
 */
function get_singular_template()
{
    return get_query_template('singular');
}