Halloween Sale 15% off Ends in See the plans

Snippet Library

Content snippets for WordPress

Snippets that add to or change your posts and pages: reading time, author boxes, “last updated” notes, content after the post or after a paragraph, and excerpt tweaks. For bloggers, publishers and anyone who wants richer posts without editing theme files.

1–6 of 6 snippets “year”

  • PHP Content

    "On This Day" Posts Shortcode

    Adds an [on_this_day] shortcode that lists posts published on today's date in previous years, a simple way to resurface archive content on the homepage or in a sidebar.

  • PHP Content

    "Years Since" Shortcode

    Adds a [years_since] shortcode that prints how many full years have passed since a date, such as years in business, years of experience or a person's age, so the number never goes out of date.

  • PHP Content

    Current Year

    Outputs the current year. Insert it with the snippet shortcode anywhere you need a year that updates itself, such as a footer notice.

  • PHP Content

    Notice on Old Posts

    Warns readers at the top of posts older than a set number of years that the information may be out of date.

Have a snippet worth sharing?

Publish it to the library from WPIDE or right here. Sign in with any WordPress site that runs WPIDE, free or Pro. Public snippets are reviewed by the WPIDE team before they appear.