Skip to main content
Agency Program Get 2× more leads and save 50% on hosting. Built for agencies ready to grow. Book a call
WP Date and Time Shortcode icon

WP Date and Time Shortcode

v2.6.7
by Denra.com · 4.9 (27 reviews)

Shortcode to show any current, past, and future date or time. Display this, previous, or next year, month, day, etc.

10K+ active installs Updated Nov 27, 2024 Tested to 6.7.2 Requires PHP 7.4
Try Demo Download
Pre-installed Ready in ~10s No card
WP Date and Time Shortcode

About WP Date and Time Shortcode

This plugin allows you to display the current, past, and future date or time in your posts and pages using shortcodes. It has many features and can be customized to show specific date and time formats. The developer is also working on a Pro edition with additional features and technical support.

Frequently asked questions

What does the WP Date and Time Shortcode plugin do?
This plugin provides shortcodes to display current, past, and future dates or times in your WordPress posts and pages. It can show various date and time components like year, month, day, hours, minutes, and seconds.
How do I use the plugin?
You can use one of the provided shortcodes directly in your post or page content. For example, [wpdts] will display the default date and time, and [wpdts-date] will show the default date format.
Can I customize the date and time format?
Yes, you can use the [wpdts-custom] shortcode with PHP date and time formatting characters to achieve a custom format.
What are some examples of available shortcodes?
Some shortcodes include [wpdts-year] for the 4-digit year, [wpdts-month-name] for the full month name, and [wpdts-day] for the day of the month.
Where can I find support for this plugin?
You can find support by reading the description and F.A.Q. section, or by writing in the Support Forum.

Changelog

2.6.7

  • Removed: The localization code of the Framework for the administration page is leading to a notice in the PHP error log file with the new WordPress 6.7.x versions, so it was removed for now. The localization ability will be restored in a future framework version.
  • Improved: Compatibility with WordPress version 6.7.1.
  • Added: A reminder for newsletter subscription and donation.

2.6.6

  • Improved: Does not throw an error when unknown time_zone attribute value is used.
  • Other: WordPress 6.6 compatibility.

2.6.5

  • Fixed: Some changes to remove deprecation messages related to PHP 8.0+.

2.6.4

  • Fixed: Bug fixed in the next attribute for some edge cases.
  • Added: Backward compatibility with version 2.5.3 – timezone duplicate item added.

2.6.3

  • Added: The missing post ID or post object for the post_id attribute when the item is post-created(-gmt), post-modified(-gmt) does not throw a PHP error but shows an understandable message.

2.6.2

  • Fixed: A bug with UTC+ or UTC- time zones. Please update if you have that type of time zone set for your website.

2.6.1

  • Fixed: Removed a couple of warnings.

2.6

  • Fixed: A bug with WordPress default time-zone for relative dates was fixed. The default time-zone works correctly now when a relative date is set in the start parameter e.g. today, tomorrow, yesterday, next week, etc.
  • Added: A specific time-zone can be used in the start attribute e.g. America/New_York, Europe/London, Asia/Tokyo, etc.
  • Added: New attribute time_zone was added to define for which time-zone the result must be displayed e.g. America/New_York, Europe/London, Asia/Tokyo, etc.
  • Added: New timestamp parameter for the item attribute to show the UNIX timestamp.
  • Added: New time-zone parameter for the item attribute to show the current time-zone for the shortcode result.
  • Added: A post ID can be selected with a new post_id attribute when date-created-(gmt) or date-modified(-gmt) is set for item.
  • Modified: Readme.txt info changes.
  • Other: WordPress 6.2 compatibility.

2.5.3

  • Other: WordPress 5.5.3 – 6.1 compatibility.

2.5.2

  • Modified: Readme.txt info changes.
  • Other: WordPress 5.5 compatibility.

2.5.1

2.5

  • Fixed: Removed Framework warnings on plugin activation and usage.

2.4

  • Fixed: There was a bug in the next attribute in some cases when the next day is in the next month. Please update!
  • Modified: Changing the shortcode to [wpdts] instead of [wp-dt] and [wp_dt]. Backward compatibility is supported and old shortcodes will still work but the use of the new one everywhere is strongly recommended.
  • Modified: Changing the init attribute to start. Backward compatibility is supported the old init attribute but the use of the new start attribute everywhere is strongly recommended.
  • Other: Preparation for the next 3.0 major update.

2.3.1

  • Fixed: A critical bug with shortcodes attributes was fixed. Please update!

2.3

  • Fixed: A critical bug with some default attributes’ initialization was fixed. Please update!
  • Improved: Added years-short alias for year-short.
  • Improved: There is only one zero attribute now for months, days, hours, minutes and seconds. Old ones ‘x_zero’ are still supported for compatibility.
  • Other: WordPress 5.4 compatibility.

2.2.1

  • Fix: Item days-in-month works even when PHP on server is complied without –enable-calendar option.
  • Other: WordPress 5.3.2 compatibility.

2.2

  • Added: Shortcode item days-in-year added.
  • Added: Shortcode duplicate/alias item date-time for item datetime.
  • Added: next attribute that helps in displaying the next date from a list of weekdays, days of month, or the last day of the current month.
  • Improved: Framework update and bug fixes.

2.1.1

  • Fixed: week-of-year item not showing correctly.

2.1

  • Framework update and bug fixes.

2.0

  • Added: Denra Plugins Framework 1.0.
  • Added: Feature to set the init attribute from page/post creation or modification time.

1.2

  • Added: Shorter version for the _change attributes removing the _change part.

1.1

  • Added: More shortcodes for easier and faster use by missing the item attribute.

1.0.1

  • Fixed: A couple of bug fixes after the initial release

1.0

  • Initial release

Try other plugins

Really Simple SSL icon

Really Simple SSL

4.9 · 4M+ installs

The easiest way to improve security! Leverage your SSL certificate and protect your website visitors.