Simple Yearly Archive

Mô tả

Simple Yearly Archive is a rather neat and simple WordPress plugin that allows you to display your archives in a year-based list. It works mostly like the usual WP archive, but displays all published posts seperated by their year of publication. That said, it’s also possible to restrict the output to certain categories, and much more.

See Usage for examples, available parameters and more.

Included languages:

  • Tiếng Anh
  • German (de_DE) (Thanks to me ;-))
  • Italian (it_IT) (Thanks for contributing italian language goes to Gianni Diurno)
  • Russian (ru_RU) (Thanks for contributing russian language goes to Dimitry German)
  • Belorussian (by_BY) (Thanks for contributing belorussian language goes to Marcis Gasuns)
  • Uzbek (uz_UZ) (Thanks for contributing uzbek language goes to Alexandra Bolshova)
  • French (fr_FR) (Thanks for contributing french language goes to Jean-Michel Meyer)
  • Chinese (zh_CN) (Thanks for contributing chinese language goes to Mariana Ma)
  • Japanese (ja) (Thanks for contributing japanese language goes to Chestnut)
  • Portuguese Brazil (pt_BR) (Thanks for contributing portuguese brazil language goes to LucasTolle)
  • Dutch (nl_NL) (Thanks for contributing dutch language goes to Bart Verkerk)
  • Spanish (es) (Spanish translation by Ibidem Group)

Click here for a demo

Developer on Twitter

Looking for more WordPress plugins? Visit

Ảnh màn hình

  • The options page

Cài đặt

  1. Download the plugin and unzip it.
  2. Upload the folder simple-yearly-archive/ to your /wp-content/plugins/ folder.
  3. Activate the plugin from your WordPress admin panel.
  4. Installation finished.

See Usage for examples, available parameters and more.

Hỏi đáp


You can add the archive to any post/page by using shortcode. See Usage for examples, available parameters and more.

How can I change the posts’ titles?

Just use the filter sya_the_title. Example: Add the following to your theme’s functions.php:

add_filter( 'sya_the_title', 'my_sya_filter_title', 10, 2 );

function my_sya_filter_title( $title, $id ) {
    return $id . ' - ' . $title;

How can I modify the post links?

Just use the filter sya_postlink. Example: Add the following to your theme’s functions.php:

add_filter( 'sya_postlink', 'sya_modify_postlinks', 10, 3 );

function sya_modify_postlinks( $link_html, $post ) {
    $dom = new DOMDocument();
    $xpath = new DOMXPath($dom);
    $link = $xpath->query("//a")->item(0);
    $link_classes = explode(' ', $link->getAttribute('class'));
    $link_classes[] = 'postyear-' . $post->post_year;
    $link->setAttribute('class', implode(' ', $link_classes));
    return $dom->saveHTML();

This will add a CSS class with the post year to the post links.

How can I change the posts’ authors listing (like in supporting the Co-Authors Plus plugin)?

Just use the filter sya_the_authors. Example: Add the following to your theme’s functions.php:

if( function_exists('get_coauthors') ) {
    add_filter( 'sya_the_authors', 'my_sya_filter_authors', 10, 2 );

    function my_sya_filter_authors( $author, $post ) {
        $coauthors = get_coauthors( $post->ID );
        $authorsCollection = array();
        foreach( $coauthors as $coauthor ) {
            if( $coauthor->display_name ) {
                $authorsCollection[] = $coauthor->display_name;
        return implode(', ', $authorsCollection);

How can I make the posts’ categories list only show child categories?

Just use the filter sya_categories. Example: Add the following to your theme’s functions.php:

function sya_child_categories( $sya_categories ) {
    return array_filter($sya_categories, function($v, $k) {
        return get_category( $k )->parent > 0;
add_filter( 'sya_categories', 'sya_child_categories', 10, 3 );

How can I change query parameters?

Just use the filter sya_get_posts that allows you to query for literally anything using WP_Query parameters. Add the following snippets to your theme’s functions.php.

Display posts that have “either” of these tags

add_filter( 'sya_get_posts', function() {
    return array(
        'tag' => 'bread,baking'

Display posts that match the search term “keyword”

add_filter( 'sya_get_posts', function() {
    return array(
        's' => 'keyword'

Display only password protected posts

add_filter( 'sya_get_posts', function() {
    return array(
        'has_password' => true

Display only 10 posts

add_filter( 'sya_get_posts', function() {
    return array(
        'numberposts' => 10

Display posts tagged with bob, under people custom taxonomy

add_filter( 'sya_get_posts', function() {
    return array(
        'tax_query' => array(
                'taxonomy' => 'people',
                'field'    => 'slug',
                'terms'    => 'bob',

Display posts from several custom taxonomies

add_filter( 'sya_get_posts', function() {
    return array(
        'tax_query' => array(
            'relation' => 'AND',
                'taxonomy' => 'movie_genre',
                'field'    => 'slug',
                'terms'    => array( 'action', 'comedy' ),
                'taxonomy' => 'actor',
                'field'    => 'term_id',
                'terms'    => array( 103, 115, 206 ),
                'operator' => 'NOT IN',

Display posts that are in the quotes category OR have the quote format

add_filter( 'sya_get_posts', function() {
    return array(
        'tax_query' => array(
            'relation' => 'OR',
                'taxonomy' => 'category',
                'field'    => 'slug',
                'terms'    => array( 'quotes' ),
                'taxonomy' => 'post_format',
                'field'    => 'slug',
                'terms'    => array( 'post-format-quote' ),

Display posts that are in the quotes category OR both have the quote post format AND are in the wisdom category

add_filter( 'sya_get_posts', function() {
    return array(
        'tax_query' => array(
            'relation' => 'OR',
                'taxonomy' => 'category',
                'field'    => 'slug',
                'terms'    => array( 'quotes' )
                'relation' => 'AND',
                    'taxonomy' => 'post_format',
                    'field'    => 'slug',
                    'terms'    => array( 'post-format-quote' )
                    'taxonomy' => 'category',
                    'field'    => 'slug',
                    'terms'    => array( 'wisdom' ),

Configuration? Parameters? Head over here

Đánh giá

27 Tháng Bảy, 2023
I have been using it for many years, it is especially useful when you have a long history of posts, it will make your post lists more manageable. It is a great plugin and with great support !
21 Tháng Tám, 2022
Small plugin, that I use for a yearly archive. Can be easily customized as it provides some options. E. g. make the year a h3/h4 by using the before and after fields.
27 Tháng Hai, 2021
You know that feeling when you finally find the right plugin, the one that does things JUST the way you want? This one did it for me. Thank you!
Đọc tất cả 29 đánh giá

Người đóng góp & Lập trình viên

“Simple Yearly Archive” là mã nguồn mở. Những người sau đã đóng góp vào plugin này.

Những người đóng góp

“Simple Yearly Archive” đã được dịch qua 2 ngôn ngữ. Cảm ơn những người tham gia dịch vì đóng góp của họ.

Dịch “Simple Yearly Archive” sang ngôn ngữ của bạn.

Muốn tham gia phát triển?

Duyệt code, check out SVN repository, hoặc theo dõi nhật ký phát triển qua RSS.

Nhật ký thay đổi


  • Revert type hinting to support older versions of PHP


  • Revert PHP8 requirement


  • Code improvements


  • Fixed Admin+ Stored XSS vulnerability


  • Added filters sya_yearanchor and sya_postlink


  • Even more improved excerpt generation 🙂


  • Improved excerpt generation
  • WordPress 5.9 compatibility


  • Added several HTML classes to the plugin output HTML to be targeted with CSS


  • WordPress 5.3 compatibility


  • Minor bugfix for the the_title filter


  • Added the filters sya_categories and sya_tags
  • Minor fixes


  • WordPress 4.8 compatibility


  • Removed printing out the module name and version as a HTML comment


  • Added filter sya_get_posts so you can query for literally anything using WP_Query parameters! See examples here


  • Added option to show tags after each post
  • Localizations updated


  • Settings page optimizations
  • Localizations updated
  • Bug fixes


  • WordPress 4.7 compatibility
  • PHP 7 compatibility


  • Fixed an issue with (post type) attachment not being listed
  • Minor bug fixes
  • Code cleanup


  • Added the possibility to include more than one custom post type


  • Polylang support


  • Added a filter sya_the_authors so you can filter the post’s authors listing before output (e.g. support for the Co-Authors Plus plugin)
  • Minor bug fixes


  • Added a filter sya_the_title so you can filter the post’s title before output
  • Minor bug fixes


  • IMPORTANT: Date format changed to reflect localized date strings. Please review and update your date string in the plugin’s settings!
  • Code cleanup
  • Localizations updated

  • Permission error fix (thanks outtareach!)
  • Code cleanup
  • Localizations updated

  • Code cleanup


  • Post thumbnails support!
  • Code cleanup and bugfixing

  • Fixed an issue with the plugin’s textdomain not loading

  • Added legacy direct PHP invocation again: <?php simpleYearlyArchive(); ?> (sorry!)
  • Fixed an issue where the anchored years weren’t displayed


  • Code rewrite (please let me know if you experience something is broken)
  • You can now specify a custom time period for a period like [SimpleYearlyArchive type="1249077600-1280527200"] where start and end point are UNIX timestamps
  • Increased performance

  • Added a CSS class post id to the post links so people can do more custom things with CSS or javascript

  • Hide comments count for posts with comments closed

  • Fixed a bug that did not reverse post order if “Reverse order” was selected


  • Improved WPML support


  • Initial WPML support (thanks to Emilie from for the help!)


  • Support for post types


  • Significant changes that result in a lot less memory consumption on blogs with 1000+ posts
  • Code cleanup

  • Fixed another PHP notice. Didn’t have enough coffee.

  • Fixed a PHP notice when using exclude/include parameter (thanks Lea!)

  • Fixed an issue that caused to load unsecure resources on SSL enabled sites


  • Fixed a bug that caused listing “auto draft” posts


  • Fixed a bug with the anchored years overview at the top


  • Added a date wrapper span so you can hide the date via CSS


  • New option “Collapsible years?” added


  • Readme.txt updated to be more compliant with the readme.txt standard
  • Moved screenshots off the package to the assets/ folder


  • Maintenance update #2 ( Dominik 🙂 )


  • Maintenance update


  • Option to reverse the order of the year/posts list output


  • Maintenance update


  • A few fixes that resulted from the previous versions


  • Character encoding for new date format string fixed
  • Fixed a bug that occured when “Anchored overview at the top” was checked while “Linked years” was unchecked (Thanks Kroom!)
  • Added an admin notice when someone didn’t already switch to the new date format string


  • IMPORTANT: Date format changed to reflect localized date strings. Please update your date string in the plugin’s settings!


  • Optional anchored links to each year at the top


  • Archive links now working again


  • Minor performance improvements
  • Min version set to 2.3


  • Private posts are now prefixed with “Private” in order to follow WordPress standards


  • Fixed a warning message


  • Date format can be set in the shortcode like [SimpleYearlyArchive ... dateformat="d/m"]


  • Changed post authot output from user_login to display_name


  • Added japanese localization (Thanks to Chestnut)!)


  • Fixed an issue on server configurations having PHP short tags disabled


  • Fixed an issue that threw an ‘Missing argument 3’ warning in PHP
  • Added apply_filters('sya_archive_output', $output) filter hook so you can alter the HTML output before it’s being returned
  • Added french localization (Thanks to Jean-Michel Meyer!)


  • Added the include parameter allowing to include categories instead of only excluding them
  • code cleanup


  • Minor Code Changes


  • Fixed issue on displaying post count for each year when there are excluded categories


  • Some options page changes
  • Improved compatibility with WP 2.7
  • Code improvements


  • Some options page changes
  • Improved compatibility with WP 2.7
  • Code improvements


  • Exclude code changed that works like the WordPress method now (which makes this archive plugin unique 😉 )
  • Private and password-protected posts now show up depending on user capibilities


  • Markup is now html strict compatible


  • Option added to display post author after each post
  • Added italian localization (Thanks to Gianni Diurno!)


  • Improved compatibility with WordPress 2.6
  • Added shortcode compatibility
  • Minor html changes


  • Improved compatibility with WordPress 2.2.x
  • Fixed issue that occasionally occured with the inline function


  • Option added to display categories after each post


  • Fixed error, that prevented backend localization


  • Simple Yearly Archive options page has WP 2.5 style (if used in WP 2.5+) (see screenshots)
  • Performance improvements


  • Year headings do not show if there are no posts in that year (Thanks to Stephanie C. Leary!)


  • Option “Show optional Excerpt” added
  • Option “Max. chars of Excerpt” added
  • Option “Indentation of Excerpt” added


  • WP 2.3 compatibility on exclude cateogries
  • minor language fixes
  • minor fixes and code optimisation


  • Added a bunch of new options


  • gettext-ready, plugins like language-switcher or polyglot are supported now


  • Now compatible with the Admin Drop Down Menu Plugin, which caused to not to be able to access the options page


  • New options page in WordPress administration
  • plugin can now be called from within a page/post


  • Now it’s possible to show posts from the given date of year only
  • Little fix in get_year_link


  • 2 parameters added: Display the current year’s posts or the past year’s posts only
  • Posts remain sorted in case of changing the post’s timestamp


  • The plugin has been released