wp_get_theme_data_custom_templates(): array

In this article

Returns the metadata for the custom templates defined by the theme via theme.json.

Return

array Associative array of $template_name => $template_data pairs, with $template_data having "title" and "postTypes" fields.

Source

function wp_get_theme_data_custom_templates() {
	return WP_Theme_JSON_Resolver::get_theme_data( array(), array( 'with_supports' => false ) )->get_custom_templates();
}

Changelog

VersionDescription
6.4.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.