跳到内容

Post Date Block: Published & Modified

v1.0.0

Weston Ruter · 2026年1月24日 上架

Appends the modified date to the Post Date block when different from the published date.

正在使用
20+
评分
暂无
累计下载
755
最近更新
2026年5月19日
需要 WordPress 6.9+已测试到 7.0.9PHP 7.4+

贡献者

截图

Settings for prefix on published date and modified date
Settings for prefix on published date and modified date
Frontend rendering of prefix on published date and modified date (when they differ)
Frontend rendering of prefix on published date and modified date (when they differ)
Settings for prefix and suffix on modified date only with line break removed
Settings for prefix and suffix on modified date only with line break removed
Frontend rendering for prefix and suffix on modified date only with line break removed
Frontend rendering for prefix and suffix on modified date only with line break removed

This plugin extends the core Post Date block variation, specifically the “Post Date” variation of the Date block. It appends the modified date to the block whenever it differs from the published date (when rendered in the provided date format). You can configure prefixes and suffixes for both dates, and you can display the modified date on a separate line.

For a full writeup of this plugin, see my blog post.

This is a prototype or stopgap for gutenberg#53099 (Post date: It is not clear that “display modified date” replaces the publishing date). See also gutenberg#61920 (Add prefix / suffix to Post Date block). What eventually lands in core will hopefully leverage “shortblocks” so that the conditional prefixes and suffixes needn’t be provided in a block settings panel.

Usage

  1. Open the Site Editor to edit a block template.
  2. Insert a Date block.
  3. In the block settings, click the “Transform to variation” button and select “Post Date”.
  4. A new “With Modified Date” panel appears in the settings. Enable the “Show modified date when different from published date” toggle.
  5. Configure the prefixes and suffixes for the published date and modified date when the two differ for the selected date format; optionally enable the toggle to show the modified date on a separate line.

Note: There is currently no preview in the editor. To see the changes, save the block template and navigate on the frontend to a post that has been modified at least a day after publishing.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums