Estimated Publish Date

Display post dates in a friendly, human-readable format like “5 days ago” or “2 weeks ago” instead of traditional date formats. Perfect for blogs and news sites where content freshness matters.

Use Cases

  • Make recent content feel fresh with “3 days ago” instead of a static date
  • Improve content calendars with relative time displays
  • Show freelancers and contributors when drafts are expected to publish
  • Display target publish dates while content awaits review

How It Works

  1. Enable the module in Switchboard
  2. Recent posts (within 30 days) automatically show relative dates
  3. Older posts continue to show standard date format
  4. Use the shortcode anywhere for manual placement

Where to Find It

Location: Automatically applies to post dates on singular posts. Also available via the [human_date] shortcode.

Automatic Behavior

When enabled, the module automatically converts dates on single post pages:

Time Since PublishedDisplay Format
Less than 1 day“5 hours ago”
1-6 days“3 days ago”
1-4 weeks“2 weeks ago”
Over 30 daysOriginal date format

The original date still appears as a tooltip when hovering over the relative date.

The Shortcode

Use the [human_date] shortcode to display relative time anywhere in your content:

[human_date]

This outputs text like “5 days ago” based on the current post’s publish date.

Where to Use It

  • Post templates
  • Widget areas
  • Custom fields
  • Page builder modules

Output Examples

The module outputs clean, translatable text:

PublishedToday’s DateOutput
Dec 28Jan 1“4 days ago”
Dec 15Jan 1“2 weeks ago”
Nov 1Jan 1Original date (over 30 days)

Styling the Output

The automatic dates are wrapped in a <span> with a title attribute:

<span title="December 28, 2024">4 days ago</span>

Style it with CSS:

/* Subtle styling for relative dates */
time span[title] {
    font-style: italic;
    color: #666;
}

/* Show original date on hover */
time span[title]:hover {
    text-decoration: underline dotted;
}

When Relative Dates Appear

The module only converts dates on:

  • Single post pages (is_singular)
  • Frontend views (not admin)
  • Posts less than 30 days old

This prevents issues with:

  • Archive pages (dates remain static)
  • Admin screens (dates stay standard)
  • Old content (full dates are more useful)

FAQ

Why only 30 days?Beyond 30 days, relative dates become less useful. “45 days ago” is harder to understand than “December 15, 2024”. The cutoff keeps the feature meaningful.
Does this affect SEO?No. Search engines see the same content. The relative date is just a display change for human visitors.
Can I change the 30-day threshold?Not currently through the UI. The 30-day threshold is designed to balance usefulness with clarity.
Does this work with custom date formats?Yes. The module respects your WordPress date format for posts older than 30 days and uses WordPress’s built-in human_time_diff() function for relative dates.
Why doesn’t it work on archive pages?Archive pages list many posts. Converting all dates to relative format could be confusing (“3 days ago”, “5 days ago”, “1 week ago” all in a row). It works on single post pages where context is clear.

The shortcode always shows relative time, even for older posts. Use it in templates where you always want “X ago” format regardless of post age.

Hover over any relative date to see the original publish date in a tooltip. This helps when visitors need the exact date.

PRO

Get access to all 147 modules with a single license

Upgrade to Pro