Herodotus Pro / Documentation

Date System: Day + Month + Year

Herodotus stores an event date separately from its WordPress publication date. Day and month determine the recurring calendar date; the historical year and era determine chronological order and the anniversary counter.

How It Works

Meta keyValuePurpose
_herodotus_day1-31Day of month
_herodotus_month1-12Month
_herodotus_yearPositive integerHistorical year
_herodotus_eraBC, AD or emptyHistorical era and optional suffix
_herodotus_mdDerived integerCombined month/day query key
_herodotus_sort_yearDerived signed integerNegative for BC, positive for AD

The Logic

  1. The plugin reads the date in the WordPress timezone.
  2. The active date mode selects one date or a set of recurring month/day pairs.
  3. Published events with complete date data are selected, filtered and limited.
  4. Results are grouped by date and ordered within each group.

The historical year does not have to match the current year. It is still required for eligibility in the date-based query, sorting, the badge and the years-ago counter. It is not merely a display label.

Example

An event dated March 14, 1879 appears on March 14 each year. Its badge can show 1879 or 1879 AD. A BC event uses a positive year plus the BC era; do not enter a negative year.

Timezone Handling

Set your site timezone under Settings → General → Timezone. The date query uses that timezone. A full-page cache can still serve yesterday's rendered output until it is purged.

Date Modes

Free supports Today. Pro adds Around today, a fixed date and upcoming ranges. The range changes which calendar dates are selected, not the historical year stored on an event. See All Attributes.

Updating Date Data

The editor, Quick Edit and Pro importer update the derived query keys when they save dates. Direct database or custom metadata writes must also keep these keys consistent. The standard WordPress REST API in 1.6.8 exposes day, month, year and optional era to authorized editors in context=edit. Successful REST writes synchronize the derived keys before responding. Other metadata writes synchronize before the next event query or at shutdown. See Developer Reference.