Finding your next read
Practical craft for people building for the web.
Explore DevelopmentFinding your next read
THE FINDERPRESS TOOL DIRECTORY
Explore this tool and check the official listing for its latest features and requirements.
01 / SOURCE DETAILS
This plugin provides a simply admin dashboard widget that lists all of the posts published to your site on this day in previous years. The same listing can be shown on the front-end via the “Years Ago Today” block (WordPress 7.0+) or the [years-ago-today] shortcode. Users have the option (via their profiles) to opt into receiving a daily email that provides a listing and links to all of the posts published to your site on this day in previous years. Links: Plugin Homepage | Plugin Directory Page | GitHub | Author Homepage Developer Documentation Developer documentation can be found in DEVELOPER-DOCS.md . That documentation covers the numerous hooks provided by the plugin. Those hooks are listed below to provide an overview of what’s available. c2c_years_ago_today-email_cron_time : Customize the time of day to email the Years Ago Today email to those who have opted-in to it. By default this is “9:00 am”. c2c_years_ago_today-email-if-no-posts : Override whether the daily Years Ago Today email is sent out on days that don’t have any posts in prior years. By default this value is false, meaning no email is sent in such circumstances. c2c_years_ago_today-email-body-no-posts : Customize the content of the body of the daily Years Ago Today email when it is sent on days that had no posts in prior years. c2c_years_ago_today-first_published_year : Explicitly define the earliest year to be considered when finding earlier published posts. c2c_years_ago_today-post_types : Customize the post types included for consideration. Default ['post'] . c2c_years_ago_today-batch_size : Customize the number of daily emails sent per batch. Default 40. c2c_years_ago_today-to_address : Customize the email address specified for the “To:” field of batched emails. Default “noreply@{site-domain}”.
02 / SOURCE DETAILS
Install via the built-in WordPress plugin installer. Or download and unzip years-ago-today.zip inside the plugins directory for your site (typically wp-content/plugins/ ) Activate the plugin through the ‘Plugins’ admin menu in WordPress View the widget on your admin dashboard. (Optional.) To show the same listing on the front-end, insert the “Years Ago Today” block (WordPress 7.0+) or add the [years-ago-today] shortcode to a post or page. Both output a title which can be overridden or omitted. (Optional.) To sign up for a daily email that lists posts published that day, go to your profile, set the checkbox for ‘”Years Ago Today” email’, choose the style of email you wish to receive, and then press the “Update Profile” button to update your profile.
03 / SOURCE DETAILS
If multiple posts were made on this day in a past year, will they be listed? Yes. Are posts published today included? No, only posts made for any year before the current year. Can I filter the widget to only show my posts (or only posts for a particular author)? Not yet. This functionality is expected in a future update. Why is the checkbox for ‘”Years Ago Today” email’ in my profile disabled? Your site has its cron system disabled (via the DISABLE_WP_CRON constant) which means scheduled events (such as this plugin’s daily emails) won’t be handled by WordPress. I opted into the daily email, but why haven’t I gotten it? The cron system for WordPress (which handles scheduled events, such as the schedule daily email) requires site traffic to trigger close to its scheduled time, so low traffic sites may not see events fire at a consistent time. It’s also possible cron has been disabled by the site (see previous question). Is this plugin compatible with multisite? Yes. Does this plugin include unit tests? Yes. The tests are not packaged in the release .zip file or included in plugins.svn.wordpress.org, but can be found in the plugin’s GitHub repository .
KEEP EXPLORING