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’.
See also
Return
(string) Full path to date template file.
Source
File: wp-includes/template.php
function get_date_template() { return get_query_template( 'date' ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
1.5.0 | Introduced. |