Skip to content

Dynamic Month & Year into Posts

Add a shortcode once. Keep years, months, dates and ages current across your WordPress site, in posts, titles, widgets and supported SEO fields.

  • Version 1.8.1
  • WordPress 6.5+
  • Tested up to 7.1
  • PHP 7.4+
Today on this site

You writeWordPress displays

[year]
2026
[monthyear]
October 2026
[date]
October 16, 2026
[weekday]
Friday
[season]
Fall

Live values in this site’s language and timezone.

8,000+ active installs
On WordPress.org, free to install.
36 shortcode tags
Years, months, dates, ages, events and seasons.
4 editor blocks
Plus Block Bindings, REST API and WP-CLI.
GPL-3.0 open source
No settings page, license key or upsell.

What Changed in Version 1.8 Every Shortcode Still Works

No established shortcode was removed or renamed. Version 1.8 moved blocks, bindings, REST and WP-CLI onto the same date engine as the shortcodes, and 1.8.1 fixed the leap-day and invalid-date edge cases in countdowns.

Site-Timezone Calculations
Shortcodes, blocks, bindings, REST responses and WP-CLI use one WordPress-aware date engine.
Daylight-Saving Safety
Calendar-day countdowns no longer drift by an hour or return the wrong number around DST changes.
Recurring Countdowns
The Live Countdown block can repeat every year, and February 29 events land on a valid day.
Searchable Shortcode Picker
Find a shortcode by name, syntax, category or purpose, then insert it from the text toolbar.
Better Block Controls
Dynamic Date previews annual dates, rollover days, text case, date and age formats in the editor.
Block Bindings Presets
WordPress 6.9+ offers ready-made year, month, date, month and year, weekday and Black Friday choices.
Scoped Integrations
Title, excerpt, SEO, builder, schema and related-post filters run only this plugin’s shortcodes.
Release Checks
Automated tests cover PHP 7.4, 8.2 and 8.5, WordPress 6.5, 7.0 and 7.1, timezones, recurrence and rollover.

I built this plugin for one narrow job: stop useful evergreen content from looking stale because a date changed. Shortcodes remain the primary and fastest workflow. Everything else in the plugin exists to make that workflow easier in the Block Editor and in code.

Gaurav Tiwari Developer, Dynamic Month & Year into Posts

Shortcode Reference 36 Tags, One Copy Away

Find the date you need and copy its shortcode into WordPress. Attributes such as n, format, ordinal, rank and region add extra forms without replacing the original tags.

Years

  • [year]Current year
  • [year n="5"]Five years from now
  • [year n="-3"]Three years ago
  • [nyear]Next year
  • [nnyear]Year after next
  • [pyear]Previous year
  • [ppyear]Year before previous

Combined Dates and Days

  • [date]Today's full date
  • [monthyear]Current month and year
  • [nmonthyear]Next month and its year
  • [pmonthyear]Previous month and its year
  • [dt]Current day number
  • [nd]Tomorrow's day number
  • [pd]Yesterday's day number
  • [weekday]Full weekday name
  • [wd]Short weekday name

Months

  • [month]Current month
  • [cmonth]Capitalized current month
  • [mon]Short current month
  • [cmon]Capitalized short month
  • [mm]Zero-padded month number
  • [mn]Month number without a leading zero
  • [nmonth]Next month
  • [cnmonth]Capitalized next month
  • [nmon]Short next month
  • [cnmon]Capitalized short next month
  • [pmonth]Previous month
  • [cpmonth]Capitalized previous month
  • [pmon]Short previous month
  • [cpmon]Capitalized short previous month

Post Dates, Events, Age and Seasons

  • [datepublished]Current post's publication date
  • [datemodified]Current post's modified date
  • [blackfriday]This year's Black Friday date
  • [cybermonday]This year's Cyber Monday date
  • [daysuntil date="2027-01-01"]Calendar days until a date
  • [dayssince date="2026-01-01"]Calendar days since a date
  • [age date="1990-05-15"]Age in complete years
  • [age date="1990-05-15" ordinal="true"]Ordinal age; rank="true" is an alias
  • [age date="1990-05-15" format="ym"]Years and months
  • [age date="1990-05-15" format="ymd"]Years, months and days
  • [season]Northern Hemisphere season
  • [season region="south"]Southern Hemisphere season

Month and weekday names follow the language and timezone configured in WordPress. The publication and modified-date shortcodes need a current post; everything else uses the site timezone.

Seasons map to Spring (March to May), Summer (June to August), Fall (September to November) and Winter (December to February), reversed for the Southern Hemisphere.

Block Editor No Shortcodes to Memorize

Select a Paragraph, Heading or List, open Insert Dynamic Date from the formatting toolbar, search the catalog and pick the shortcode you need. The editor highlights the inserted token; the front end shows only the value.

Insert Dynamic Date picker in the WordPress Block Editor
Insert an established shortcode from the text formatting toolbar.

Four Dedicated Blocks

Dynamic Date

Choose a year, month, date, weekday, age, season, post date, event date, annual occurrence or calculated date, with offsets, rollover day, format, text case or an annual rule where the type supports it.

Live Countdown

Count days until or since a target date. Repeat an annual countdown so birthdays, anniversaries and New Year timers roll forward on their own.

Published Date

Show the current post’s publication date with an optional prefix, suffix or PHP date format.

Modified Date

Show the current post’s last modified date with the same formatting controls.

Dynamic Date block settings in the WordPress editor
Dynamic Date shows only the controls that apply to the date type.
Live Countdown block settings in the WordPress editor
Live Countdown takes a target, direction, label and optional annual repeat.

Block Bindings on WordPress 6.5+

Bind a core Paragraph, Heading or Button straight to the dmyip/date source. WordPress 6.9+ shows presets for common values; 6.5 through 6.8 can still use a manually configured binding.

block markup
<!-- wp:paragraph {"metadata":{"bindings":{"content":{"source":"dmyip/date","args":{"type":"year"}}}}} -->
<p></p>
<!-- /wp:paragraph -->

Seven Theme-Neutral Patterns

Copyright Footer, Last Updated, Current Month Heading, Black Friday and Cyber Monday Dates, 30-Day Countdown, Recurring Birthday Countdown and Recurring New Year Countdown. They use core blocks and inherit your theme instead of forcing a design.

Four everyday Dynamic Dates patterns rendered in WordPress: Copyright Footer, Last Updated, Current Month Heading, and Black Friday and Cyber Monday Dates
Everyday patterns in Twenty Twenty-Five.
Three countdown patterns rendered in WordPress: 30-Day Countdown, Recurring Birthday Countdown, and Recurring New Year Countdown
Countdown patterns in Twenty Twenty-Five.

Developer Tools One Date Engine Everywhere

Use the same values in templates, integrations and automations that your shortcodes show on the page.

The public, read-only dmyip/v1 API returns the same site-timezone values the shortcodes and blocks use.

requests
GET /wp-json/dmyip/v1/dates
GET /wp-json/dmyip/v1/shortcodes
GET /wp-json/dmyip/v1/date/year?offset=-3
GET /wp-json/dmyip/v1/date/age_ymd?date=1990-05-15
GET /wp-json/dmyip/v1/render?shortcode=%5Byear%20n%3D-3%5D

Compatibility Works With the Stack You Have

Where dynamic dates work, and the few boundaries worth knowing before you rely on them.

SEO and Metadata

  • Rank Math and Rank Math Pro: titles, descriptions, breadcrumbs, OpenGraph and supported schema fields
  • Yoast SEO and Yoast SEO Premium: titles, descriptions, OpenGraph and JSON-LD schema
  • SEOPress and SEOPress Pro: titles, descriptions, OpenGraph and schema
  • SureRank, and native WordPress titles wherever the tool applies WordPress filters

Editors, Builders and Themes

Tested with these editors, builders and related-post plugins:

  • Block Editor
  • Classic Editor
  • Elementor
  • WPBakery
  • Visual Composer
  • Beaver Builder
  • Brizy
  • Oxygen
  • Bricks
  • GenerateBlocks
  • Greenshift
  • Kadence Blocks
  • Spectra
  • Otter Blocks
  • Jetpack Related Posts
  • Contextual Related Posts
  • Intelly Related Posts

Output inherits the active theme, including:

  • Twenty Twenty themes
  • Astra
  • Neve
  • Hello
  • Kadence
  • GeneratePress
  • Blocksy
  • OceanWP

Performance and Privacy

  • Shortcodes and Block Bindings load no front-end CSS or JavaScript
  • Date rendering writes nothing to the database
  • Live Countdown loads a small Interactivity API module only where the block is used
  • No analytics, tracking, cookies, external requests, admin notices, license checks or upsells
  • Works with page caching; recurring countdowns recalculate in the browser
  • Localized through WordPress date and translation APIs

Ordinary date shortcodes render on the server. Set your page cache to expire or purge when a year, month, day or age needs to change. Updating a date doesn’t update the facts in an article.

Some third-party fields strip shortcodes on purpose. Prefer a documented integration, a selective field filter, a Dynamic Date block or Block Bindings over a global do_shortcode() filter.

Installation Live in a Minute

There’s no setup wizard or options page. Install it, activate it and write your first shortcode.

Get It on WordPress.org
  1. Open the Plugin Installer

    Go to Plugins > Add New Plugin in your WordPress dashboard.

  2. Search for the Plugin

    Search for Dynamic Month & Year into Posts.

  3. Install and Activate

    Choose Install Now, then Activate.

  4. Write Your First Shortcode

    Type [year] in a post, page, heading, widget, title or supported SEO field. To install by hand, upload the plugin ZIP or folder to /wp-content/plugins/ and activate it.

Where People Use It

  • Evergreen titles such as "Best WordPress Plugins" plus the current year
  • Affiliate roundups and monthly deal pages
  • Copyright notices and legal-page dates
  • Black Friday, Cyber Monday, seasonal and event content
  • Age, experience, anniversary and tenure calculations
  • Launch countdowns and milestone tracking
  • Published and modified dates inside layouts
  • Headless apps and automations through REST or WP-CLI

I Build Tools That Pay for Themselves And Give Away the Ones That Can’t

Everything here is quick to set up, light on your pages and built to do one real job well. I only charge for the tools that can make you money. The rest are free.

Gaurav Tiwari

Hi, I’m Gaurav

I design, build and support every product on this site myself. When you email me, the person reading it is the one who wrote the code.

I’d rather ship one tool you’d miss if it vanished than ten that sit in your plugin list doing nothing.

  • You talk to me, not a ticket queue
  • Paid tools have to earn their price
  • Free tools stay free
More about me

18+years building websites, plugins and stores, since 2008

I obsess over performance

Switch a feature off and it loads nothing. What does load stays small. A tool that replaces a plugin shouldn’t make your pages slower.

I care how it feels

Clear screens, sensible defaults and settings written in plain English. If you need a tutorial for the basics, that’s my design mistake, not yours.

I build for everyone

Full keyboard support, visible focus, proper labels and text you can actually read. When more people can use your store, more people can buy from it.

I build tools that earn

My paid tools help you sell, renew, license or convert. If one just sits in your stack, I haven’t done my job.

If it can’t earn, it’s free

I won’t charge for anything that can’t make you money. The free tools get the same care as the paid ones, down to the last setting.

Frequently Asked Questions

A few useful answers before you install.

Still stuck? Ask in the support forum.

Why Would I Need a Dynamic Date Plugin?

Use it when a date should stay current without changing the meaning of the content. A shortcode can keep a year in an evergreen title, a month on a deal page, a copyright notice, an age, an anniversary or an event date current on its own. Don’t use a dynamic date to make old or unreviewed information look freshly verified.

Did Version 1.8 Remove or Replace the Original Shortcodes?

No. The original shortcode tags remain the main public interface. Versions 1.8.0 and 1.8.1 add better editor search, block controls, recurrence, Block Bindings presets, and REST and WP-CLI options without adding replacement shortcode tags.

Do Dynamic Dates Stay Correct Behind a Caching Plugin or CDN?

Shortcodes and bindings render when WordPress generates the page, so a cache keeps that value until it expires or is purged. Use a sensible cache lifetime for daily or monthly values. The Live Countdown block recalculates in the browser, so annual countdowns roll over without waiting for a full-page cache refresh.

Can I Use the Plugin Without Shortcodes?

Yes. Use the Dynamic Date, Live Countdown, Published Date or Modified Date block, bind a supported core block to dmyip/date on WordPress 6.5+, or fetch values through the public REST API. Shortcodes are still the simplest choice for a date inside a sentence, title or SEO field.

Does the Plugin Have Settings?

No. Date language, timezone and default formatting come from WordPress. Shortcode attributes and block controls handle the cases that need a different format, offset, case, region or target date.

Will It Slow Down My Site or Collect Data?

The shortcode and binding paths load no front-end assets and make no date-specific database query. The optional Live Countdown loads a small browser module only where it’s used. There are no analytics, tracking, external requests, settings table, license check, ads or upsells.

How Do I Get Support or Request a Feature?

Use the WordPress.org support forum for bugs and compatibility questions, and the GitHub repository for source-level issues and contributions. You can also contact me here with a feature request. Include your WordPress, PHP and plugin versions plus a minimal example.

Changelog From 1.0 to 1.8.1

Every release since the first public version. Source and release packages are on GitHub.

  1. Version 1.8.1

    Latest
    • FixedRecurring February 29 countdowns now give the same valid leap-day result on the server and in the browser.
    • FixedInvalid countdown dates no longer show as 0 days, and the default label switches correctly between "day" and "days".
    • FixedWP-CLI accepts both complete plugin shortcodes and date types with named options.
    • ImprovedTested up to WordPress 7.1, with WordPress 6.5 and PHP 7.4 still the minimums.
    • ImprovedBlock attributes stay editable inside WordPress 7.0+ content-only patterns.
    • ImprovedUpdated development dependencies with all available security fixes, and expanded automated checks across WordPress 6.5, 7.0 and 7.1.
    • ImprovedCorrected the documentation for countdown precision, the editor, patterns, caching and WP-CLI.
  2. Version 1.8.0

    • AddedRecurring, cache-aware Live Countdown behavior with leap-day handling, plus Block Bindings presets.
    • ImprovedDate calculations use the WordPress site timezone and calendar-day arithmetic across daylight-saving changes.
    • ImprovedSearchable shortcode picker, block previews, toolbar accessibility, responsive editor controls and theme-neutral patterns.
    • ChangedTitle, excerpt, builder, related-post and SEO integrations process only this plugin’s shortcode tags.
    • FixedThe Countdown block’s Interactivity API module now builds as a JavaScript module.
    • ChangedRaised the minimum WordPress version to 6.5.
    • ChangedRemoved duplicate legacy runtime files and consolidated rendering around one date engine.
    • AddedAutomated coverage for timezones, recurrence, rollover, shortcode compatibility, supported PHP versions and WordPress 6.5 through latest.

Earlier Releases

1.7 releasesFebruary to June 2026

1.7.4

  • Confirmed compatibility through WordPress 7.0.

1.7.3

  • Fixed season on legacy installations without Composer.
  • Restored the ordinal and rank attributes for age on the legacy path.
  • Removed duplicate OpenGraph, Elementor, Contextual Related Posts and SEOPress filter registrations.

1.7.2 and 1.7.1

  • Added Bricks Builder integration.
  • Added the Published Date and Modified Date blocks.
  • Added the dmyip_core_filters switch for title and excerpt processing.
  • Improved the GitHub release workflow and changelog generation.
  • Fixed large negative year offsets and unwanted zero-padding in years.

1.7.0

  • Added the season shortcode with Northern and Southern Hemisphere support.
  • Added ordinal="true" and rank="true" to age, including correct 11th, 12th and 13th handling.
1.6 and 1.5 releasesDecember 2025 to January 2026

1.6.2 and 1.6.1

  • Improved PHP 7.4 compatibility.
  • Fixed countdown compatibility on PHP versions below 8.

1.6.0

  • Added age with years, years and months, and full breakdown formats.
  • Added the Dynamic Date and Live Countdown blocks, Block Bindings, the REST API, WP-CLI, patterns, shortcode highlighting, namespaced code, PHPStan, PHPCS and CI.
  • Added six patterns for age, birthdays, experience, New Year, milestones and promotions.

1.5.5 to 1.5.1

  • Reworked, tested and corrected Live Countdown behavior across several patch releases.

1.5.0

  • Added daysuntil and dayssince.
  • Added the Block Editor toolbar picker, an editor reference panel, seven initial patterns and automated GitHub releases.
1.4 and 1.3 releases2023 to March 2025
  • 1.4.0: General improvements.
  • 1.3.9: Refactored code and improved Rank Math JSON and excerpt handling.
  • 1.3.8: Added nd and pd.
  • 1.3.7: Added nmonthyear and pmonthyear.
  • 1.3.6: Added shortcode support to archive titles.
  • 1.3.5: Made Black Friday and Cyber Monday dynamic and added numeric offsets to year.
  • 1.3.4: Added datemodified and datepublished.
  • 1.3.3: Reverted a set of changes.
  • 1.3.2: Completed Yoast and SEOPress support and optimized the code.
  • 1.3.1: Corrected Black Friday and Cyber Monday dates.
  • 1.3.0: Added blackfriday, cybermonday and Intelly Related Posts support.
1.2 releases2021 to 2022
  • 1.2.9: Readme update.
  • 1.2.8: Corrected next-month behavior and stopped rolling monthyear forward after the 28th.
  • 1.2.7: Fixed localized monthyear output.
  • 1.2.6: Added Elementor and Elementor Pro widget support.
  • 1.2.5: Added weekday and wd.
  • 1.2.4: Added Yoast JSON-LD support.
  • 1.2.3: Added the original end-of-month rollover for monthyear, later revised in 1.2.8.
  • 1.2.2: Added capitalized month variants, nnyear, ppyear, monthyear and better Rank Math Pro and Elementor compatibility.
  • 1.2.1: Added mm, mn and Jetpack Related Posts support.
  • 1.2.0: Added next and previous month shortcodes and WordPress 5.8 support.
1.1 and 1.0 releases2020 to 2021
  • 1.1.9: Removed a costly Rank Math description filter.
  • 1.1.8: Reverted part of the 1.1.6 changes.
  • 1.1.7: Bug fix.
  • 1.1.6: Added dt, Rank Math Product schema-description support and WordPress date-format output for date.
  • 1.1.5: Added mon.
  • 1.1.2: Updated instructions and readme.
  • 1.1.1: Bug fixes.
  • 1.1.0: Added Rank Math OpenGraph support.
  • 1.0.9: Improved Yoast schema and OpenGraph support.
  • 1.0.8: Added Contextual Related Posts support.
  • 1.0.7: Added SEOPress support.
  • 1.0.6: Added Yoast SEO support.
  • 1.0.5: Added multilingual output, date and WordPress 5.6 compatibility.
  • 1.0.4: Optimization.
  • 1.0.3: Readme update.
  • 1.0.2: Added pyear and nyear.
  • 1.0.1: Fixed naming conflicts.
  • 1.0.0: First public version.

Set It Once. Keep It Current.

Free, open source and ready for your next WordPress post.

Licensed under GPL v3 or later.