Description
Displays the current date (or any date you specify), formatted using PHP date format tokens.
Shortcode Examples
Display the current date using the default format:
[memb_date]
Display a specific date:
[memb_date date="2024-01-15"]
Display the current date in a custom format:
[memb_date format="Y-m-d"]
Display a future date in a specific timezone:
[memb_date date="+1 week" host_timezone="America/New_York"]
Shortcode Parameters
date | The date/time string to display. Accepts any value valid for PHP's strtotime(), such as now, +1 week, 2024-01-15, or next Thursday. (Default: now) |
|---|---|
format | The PHP date format string. See the date formatting reference for available tokens. (Default: l, F dS, Y, g:sA e) |
host_timezone | The timezone to use when formatting the date, as a PHP timezone identifier (e.g. America/New_York). If empty, the WordPress site timezone is used. (Default: empty) |
capture | Capture the output of the shortcode and route it to a variable for later use. (?) |
txtfmt | A comma separated list of text processing functions to apply to the output. (?) |
htmlattr | The HTML attribute to use if this shortcode is embedded inside of an HTML tag. |
before | Text to display before the date output. (Default: empty) |
after | Text to display after the date output. (Default: empty) |
Shortcode Attributes
| Conditional | No |
|---|---|
| Nestable | No |
| Accepts formatting | Yes |
| Capturable | Yes |