Filters the date of the post.
Parameters
$the_datestring|int- Formatted date string or Unix timestamp if
$formatis'U'or'G'. $formatstring- PHP date format.
$postWP_Post- The post object.
Source
return apply_filters( 'get_the_date', $the_date, $format, $post );
Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |
Example migrated from Codex:
Below is a basic example on how to use the
get_the_datefilter to modify date format for a post type called ‘product’: