get_date_template() WordPress Function

The get_date_template() function in WordPress allows you to change the way dates are displayed on your website. This function takes one parameter, which is the date format you want to use. The date format can be either "d" (day), "m" (month), or "Y" (year). You can also use "l" (letter) to display the full name of the day, "F" to display the full name of the month, or "M" to display the three-letter abbreviation for the month.

get_date_template() #

Retrieve path of date template in current or parent template.


Description

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

Top ↑

See also


Top ↑

Return

(string) Full path to date template file.


Top ↑

Source

File: wp-includes/template.php

function get_date_template() {
	return get_query_template( 'date' );
}


Top ↑

Changelog

Changelog
VersionDescription
1.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.