Descripción
Time Machine is a simple plugin that grab N published articles from database (posts and/or pages) published on current day and/or offset of time in past years, and list them in widget or block.
User can set widget title, number of displayed articles and message shown when there is no public articles in past.
Features
- Shortcode, legacy widget, block-based widget and Gutenberg block, all with the same options
- Set the number of articles to list
- Set a custom message for days with no articles in the past, or hide the whole list when there is nothing to show
- Include or exclude pages, and optionally exclude articles from the current year
- Set offset and offset direction (before, after or both) with a time range in days, weeks or months
- Optionally show an excerpt with a custom length; it is generated from post content when there is no manual excerpt
- Optionally show the number of comments
- Lists only published articles (drafts are never included)
- Password protected articles are excluded unless you explicitly enable them; when included, the manual excerpt is used if there is one, otherwise no excerpt is generated from the content until the visitor unlocks the article (same as WordPress core)
- Works with full page cache plugins: the list is refreshed after page load through a small REST endpoint (can be disabled with a constant in
wp-config.php) - Site Health check warns you if a REST API restriction blocks that refresh, and tells you how to fix it
- Cached queries that are cleared automatically whenever a post or page is saved
- Clean, semantic HTML5 markup that validates without errors, styled by your theme’s CSS
Bloques
Este plugin proporciona 1 bloque.
- Time Machine List articles published in the past, relative to today, by a configurable time offset.
Instalación
Manual
- Upload the entire
time-machinefolder to the/wp-content/plugins/directory. - Activate the plugin through the
Pluginsmenu in WordPress. - Insert new
Time Machinewidget onAppearanceWidgets. - Configure
Time Machineoptions.
Automatic
- Go to
PluginsAdd Newand search fortime machine. - Click on
Install Nowlink bellowTime Machinesearch result and aswerYeson popup question. - If you need enter FTP parameters for your host and click on
Proceed. - Activate the plugin through the
Pluginsmenu in WordPress. - Insert new
Time Machinewidget onAppearanceWidgets. - Configure
Time Machineoptions.
Preguntas frecuentes
-
Why name Time Machine?
-
I like effect that produce Time Machine – traveling trough time. This plugin does exactly that, but with fixed month and day constant.
-
How I can help?
-
Revire and rate plugin, submit suggestions, contribute on WordPress forum.
-
Does Time Machine work with full page cache plugins (WP Rocket, WP Fastest Cache, W3 Total Cache…)?
-
Yes. Time Machine’s list is refetched from a small REST endpoint right after the page finishes loading, so the visible content stays current even when the whole page has been cached for longer than a day. The cached markup already on the page stays visible until (and unless) that request succeeds, so nothing is ever blank while it refreshes, and the page cache itself is never touched or purged. If you prefer to disable this and rely only on the page cache’s own expiry, add
define( 'TIME_MACHINE_DISABLE_REFRESH', true );towp-config.php. -
How do I turn the front end auto-refresh off?
-
Add this to
wp-config.php:define( 'TIME_MACHINE_DISABLE_REFRESH', true );No
data-time-machine-*attributes are printed after that, the refresh script is never enqueued, and no REST request is ever made. Lists render once, on the server. On a page held in a full page cache for longer than a day, the list can then be a day or more behind. -
The browser console shows a 401 on `/wp-json/time-machine/v1/list`. What is wrong?
-
A security plugin or snippet on your site closes the whole REST API to signed out visitors, through the
rest_authentication_errorsfilter. That filter runs before any route can state that it is public, so Time Machine cannot exempt its own route from it, however read only that route is.Nothing is broken for your visitors. The list is rendered on the server and stays on screen; only the refresh described above is skipped, and the failed request is logged in the console. Time Machine checks this once a day and tells you in
Tools->Site Health, which spells out the two options below.Option 1: switch the refresh off. Add this to
wp-config.php:define( 'TIME_MACHINE_DISABLE_REFRESH', true );No request is made after that, so the console stays clean. Lists render once, on the server, exactly as they did before this feature existed. On a page held in a full page cache for longer than a day, the list can then be a day or more behind.
Option 2: let this one route through. It is read only and returns the same published titles, excerpts and links the page already shows to the same visitor, so letting it through gives nothing away. Add this to a must-use plugin or to your theme’s
functions.php:add_filter( 'rest_authentication_errors', function ( $result ) { if ( ! is_wp_error( $result ) ) { return $result; } $route = isset( $GLOBALS['wp']->query_vars['rest_route'] ) ? ltrim( $GLOBALS['wp']->query_vars['rest_route'], '/' ) : ''; if ( 0 === strpos( $route, 'time-machine/v1/' ) ) { return null; } return $result; }, 99 );It runs after the restriction and before the core cookie check, and clears the error for the
time-machine/v1namespace only. Every other route keeps the restriction exactly as it is.
Colaboradores y desarrolladores
Este software es de código abierto. Las siguientes personas han contribuido a este plugin.
ColaboradoresTraduce “Time Machine” a tu idioma.
¿Interesado en el desarrollo?
Revisa el código, echa un vistazo al repositorio SVN o suscríbete al registro de desarrollo por RSS.
Registro de cambios
26.9.0 (2026-09-19)
- Test: WordPress 7.1
- Refactor: Full plugin refactored
- Add: Support for Block Editor (FSE Widget and Gutenberg Block)
- Add: Excerpt is now generated from post content when no manual excerpt is set, same fallback WordPress core uses for
the_excerpt() - Add: Password protected posts with no manual excerpt show a notice instead of a generated excerpt, until the current visitor unlocks that post
- Add: Front-end auto-refresh of the post list via a REST endpoint, so pages served from a full page cache plugin still show current content
- Add: Daily check of whether a site wide REST API restriction blocks the front-end refresh route, reported in a dismissible admin notice and in a Site Health test, with the snippet needed to allow that one read only route
- Add:
TIME_MACHINE_DISABLE_REFRESHconstant to switch the front-end refresh off site wide fromwp-config.php - Change: Remove
hoursoffset - Change: Rename rangetype -> direction and rangenum -> offset
- Change: Remove Excerpt before/after HTML tags and wrap excerpt into span with class excerpt
- Change: Offset query results are now sorted newest year first
- Improve: Offset query now compares whole days instead of the exact time, and results are cached (object cache, or transient when no persistent object cache is active)
- Improve: Offset query loop now starts from the oldest published post’s year (cached for a month) instead of a hardcoded 2002
- Improve: Cache is invalidated automatically whenever a post or page is saved, instead of only relying on the daily/monthly expiration
- Improve: Front-end script is enqueued minified, and served as readable source only while
SCRIPT_DEBUGis on
0.4.1 (2014-12-20)
- Improve: multi instance widget
- Improve: rewritten to OOP and optimized code
- Add: rel=”nofollow” to post links, to prevent reindexing old posts and and affect page rank
- Add: uninstall procedure to remove widget settings
- Test on WordPress 4.1
0.0.6 (2011-04-02)
- Fixed timezone bug. Now Time Machine instead of GMT use WordPres timezone for time offset calculations.
0.0.5.5svn (2009-08-03)
- Added option to display excerpt, with feature to short and insert XHTML code before and after excerpt
- Added date offset (+/- N hours/days/weeks/months)
- Added offset type (before to current date, before to after current date, current date to after)
0.0.5.4 (2009-07-13)
- fixed bug for feature added in 0.0.5.3 (reported by Rarst)
- Added Belorussian language (submited by Marcis Gasuns)
0.0.5.3 (2009-07-12)
- Added option do hide widget if there is no posts in past (sugessted by Rarst)
- Added Simplified Chinese language (submited by Leslie Yeh)
- Updated Serbian and Italian language
- Fixed post links if blog is not in root with permalink (thanks Leslie)
0.0.5.2 (2009-06-19)
- Added Italian localisation (submited by Caporale Reyes)
0.0.5.1 (2009-03-08)
- Fixed broken 0.0.5 (‘Number of posts’ above links)
0.0.5 (2009-03-08)
- compare GMT date, not local date on host
- added description to displayed number of comments
0.0.4 (2009-02-28)
- Added option to display number of comments
0.0.3 (2009-02-14)
- Fixed links to articles when is active non-Home pages
- Added option to exclude WordPress Pages from listing
- Added option to exclude articles published in current year from listing
- Updated Serbian translation
0.0.2 (2009-02-14)
- Fixed SQL query to work as expected
- Added option to display password protected posts in list
0.0.1 (2009-02-13)
- Initial release

