Date information

Here goes some date-related extra information.

While WordPress shows the published date at the top of posts, it does not so for the likewise stored date and time of the last edit, and pages are not dated at all. Now these dates may be displayed before or after the content. Additional information may eventually be provided alongside, like when or where this content was published first. Published and/or last modified dates may also be accessed programmatically in the page head.

Activate

Display information

A general switch to turn the feature on is found in this plugin’s settings under “Date information”. The following 8 checkboxes allow for a more fine-grained activation depending on type (post or page), position (start or end), and history (published, last modified):

These three items are checked by default

Meta information

The date meta tags in the page head are activatable separately in the “Date meta tags” settings section, also with a main switch and 4 checkboxes according to history (published, last modified) and format (common, Open Graph):

The date meta tags are all checked by default for display

Configure

Last modified, published dates

The labels are configurable for posts, pages, top and bottom individually, or collectively with the “Unified” option.

The “Unified” option is active by default
With the “Differentiated” option, each item has its label configured individually

When configuring the labels, be sure to always include the placeholder %s at the exact position where the date should show up. That is a requirement for internationalization, as readers may be used to see the label before, after, or around the date, depending on the language.

Ordering the dates

The order may also be configured: published, last modified, or the other way around. Ordering the dates chronologically is not recommended, as updates are usually considered more interesting than initial releases, and the order also affects the “published first” information (if there is any). So these boxes are all unchecked by default:

Checking a box causes the dates to be ordered chronologically in the related set.

“Published first” information

Another feature is configurable only in the Post Meta box: the “Published first” information. Two text input areas with a configurable prefill take any information, typically when or where the article was first published.

These are the prefills as configured by default

The information displays together with the other dates before or after the content. Each field’s prefill is saved separately to check the field contents against it. A difference triggers display.

Changing the prefill settings does not affect already published posts: Each article has the prefills at creation time saved to the database. So, changing these settings at any time is no problem:

Editing published-first prefills in the settings

How it works out

While the date is shown in clear text, the time appears in a plain tooltip on hovering the date with the mouse pointer:

The time shows up on hover

As usual, the date is link text to the page’s address, so clicking it reloads the page.

The “published first” information displayed on this page, it is configured to demonstrate the feature.

As of the meta tags, these may be read by bibliography software when saving a page’s URL and, eventually, its content. Humans can easily find them in the page source, looking for <meta name="date" or similar:

These common format date meta tags as added, the last two lines on this screenshot
The same date meta tags after the page source has been processed by the official AMP plugin; search for "date" in the minified source code

Aspect

The styling of the visible date information may be fine tuned and adapted to existing information, in four settings subsections for posts, pages, top and bottom, here in the settings table of contents:

Although visually distinct in the settings table of contents, subsections are but ordinary sections. Numbering is continuous.

The configurable style rules are alignment, margins above and below, font size, and label color:

These settings are usually sufficient to help make added items consistent with the theme.
Thank you for reading!
Last updated:
Published:
The feature behind this line is discussed on this page.