get_home_template

Advertisement

Summery Summery

Retrieve path of home template in current or parent template.

Syntax Syntax

get_home_template()

Description Description

The template hierarchy and template path are filterable via the ‘$type_template_hierarchy’ and ‘$type_template’ dynamic hooks, where $type is ‘home’.

Return Return

(string) Full path to home template file.

Source Source

File: wp-includes/template.php

function get_home_template() {
	$templates = array( 'home.php', 'index.php' );

	return get_query_template( 'home', $templates );
}

Advertisement

Changelog Changelog

Changelog
Version Description
1.5.0 Introduced.

See also See also

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.