Simple Yearly Archive Plugin// Making Archiving Easy & Elegant

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.

The plugin in action
The plugin requires WordPress 3.7+

  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.

  1. Deactivate the plugin from your WordPress admin panel.
  2. Upload the folder simple-yearly-archive/ to your /wp-content/plugins/ folder and overwrite the existing file.
  3. Activate the plugin from your WordPress admin panel.

Implementation / Usage

Since WordPress 2.5 the function can be called with a shortcode:
Some examples follow - each is a proper invocation of the plugin:
[SimpleYearlyArchive type="yearly_past"]
[SimpleYearlyArchive type="1249077600-1280527200"]
[SimpleYearlyArchive type="yearly" exclude="22,11"]
[SimpleYearlyArchive exclude="22,11"]
[SimpleYearlyArchive include="10,11"]
[SimpleYearlyArchive dateformat="%d/%m"]
[SimpleYearlyArchive posttype="my_product"]
Call the simpleYearlyArchive function like so:
simpleYearlyArchive('type', 'ExcludeCategoryIDs', 'DateFormat');
Some examples follow - each is a proper invocation of the plugin:
simpleYearlyArchive('yearly','','', 'my_product');
Parameter options are like following:

  • type (defaults to 'yearly'):
    - yearly: Displays a year-based list (Default). Can be empty aswell.
    - yearly_act: Only posts from the current year are displayed.
    - yearly_past: Only posts from the past years are displayed.
    - "date of year": Only posts from the given year are displayed.
    - "<unixtime-from>-<unixtime-to>": Only posts from the given (unix)time period are displayed.
  • ExcludeCategoryIDs:
    - A comma-separated list of category IDs you want to exclude.
  • IncludeCategoryIDs:
    - A comma-separated list of category IDs you want to include.
  • PostType (defaults to 'post'):
    - A registered post type to show.
  • DateFormat:
    - The date format string, according to

In order to run your blog proper and clean code, it's highly recommended to check if a plugin exists before calling it. If the plugin is not activated, it will "break" the theme and it may report errors or fail to load. It is therefore imperative to prevent the plugin from being detected in case it is turned off:
[php]if (function_exists('simpleYearlyArchive')) {

Options menu

There are a couple of options in the Simple Yearly Archive options menu.

  • Date format:
    The date output be customized. Check for date formatting.
  • Seperator between date and post title:
    The seperator is displayed between the date and the post title.
  • Linked years?:
    Wanna have the years linked?
  • Before / After (Year headline):
    HTML tags, that will be inserted before and after the date headlines.
  • Show post count for each year?:
    Show the total post count behind for each year?
  • Show comments count for each post?:
    Show comments count behind each post?
  • Show categories after each post?:
    Show categories behind each post? The output can be styled with the CSS class sya_categories.
  • Show optional Excerpt (if available)?:
    Show the optional excerpt below each post title, if available?
  • Max. chars of Excerpt (0 for default):
    How much chars of the excerpt to show? Enter 0 to show the entire excerpt.
  • Indentation of Excerpt (in px):
    How much pixels the excerpt should be indented.
  • Link back to my website in plugin footer?:
    Consider linking back to my homepage in the plugin's footer.


846 Responses

  1. Same question as before:
    How do I get to display the archive as in your demo.
    2017 (67)
    2016 (19)
    2015 (12)

    Please help me with this!

  2. Expat Gone ForeignJune 2, 2018 at 8:36 pm

    Hi Oliver,

    Thanks for this plugin! I have a quick question:

    My page now displays the archives like this:

    and so on.

    When I quick on a specific year, for instance 2018, X number of posts are displayed under 2018.

    My question is if there’s any way to display every posts under every year without having to click on each year. I’d like visitors to click on the page where I have the archive and already be able to see each posts under each year without having to click on them.

    Is that possible?


  3. So is there a way to make it so that it will limit the list to a user defined period based on the current time? Like only posts from the past week or month? Or perhaps limit the total number of posts, like only displaying the last 200 posts? Thanks.

    • As for limiting the list by time period please take a look at the “Implementation / Usage” section on this page, specifically the “type” parameter.

      As for limiting the output to e.g. 200 posts just add the following code to the end of your theme’s functions.php file:

      add_filter( 'sya_get_posts', function() {
          return array(
              'numberposts' => 200
      • Thank you so much! That last bit to limit by number of posts worked like a charm! Thank you so much for such a wonderful plugin!

  4. Hi Oliver

    (I thought I asked this a couple of weeks ago, but cannot find the post now. Maybe I posted somewhere else or made another mistake. Hope I didn’t offend you in some way and it got deleted. Anyway, I’ll try again)

    Because the digits in the font I use have different widths, I cannot find a way of getting the first character of my titles to line up perfect vertically in the archive list. Can you suggest a way of achieving this with the current release? If not, would you kindly consider some feature to allow this in a future release?

    Many thanks


  5. Ritchie Pettauer | datenschmutz.netJuly 20, 2018 at 1:18 pm

    Hi Oliver,

    great plugin – I’ve been looking to implement a yearly archive for quite a while. CSS is clearly structured, the options are great.

    I only miss one feature: I’m using some custom image sizes which are registered with the WordPress media library. Would it be possible to use one of these image sizes instead of the five standard ones? (I don’t want the features images to get cropped).


    • Hi Ritchie, actually your custom image sizes should appear in the plugin’s thumbnail drowndown for your to select. Doesn’t it for you?

  6. Hi Oliver

    Is there a way i can make the yearly achieve list to show on another page if the list is too long?


    then we have a NEXT BUTTOM to go to another page.

    • Hi Elisha, you can use the “type” parameter, e.g.

      [SimpleYearlyArchive type="yearly_act"]

      to display only posts from the current year

      [SimpleYearlyArchive type="yearly_past"]

      to display only posts from the past years

      [SimpleYearlyArchive type="2017"]

      to display only posts from 2017

  7. Hello,
    i am strugling to display only one category. I am using

    [SimpleYearlyArchive type="yearly" exclude="x"]

    where i replace x by the category name. But it doesn’t work. The category is not excluded.
    Can you hepl me with this?


  8. Hello Oliver,

    Thanks for the plugin, very great!

    There’s only one thing that I am not getting fixed. I use collapsible years, but I can’t find a good way to hide the bullets at every result of the output.

    Do you have a solution for me on how to hide these bullets at every list result?

    Thanks in advance,

    • Hi Tim, adding the following to your theme’s style.css should do the trick:

      .sya_container > ul {
        list-style: none;
        margin-left: 0;
  9. Hi. I´d like to show in yearly archive only posts with one certain category (let´say the category ID is “15”). Which shortcode I have to use?

    • Hi Tarmo,

      [SimpleYearlyArchive include="x"]

      where x is the category ID you’d like to show posts from.

  10. I installed Simple Yearly Archive earlier this year using the [SimpleYearlyArchive] shortcode.

    All I want is each year to display in the list, with the year being hotlinked to a list of posts for that year. And that’s how it displayed when I originally installed the plugin.

    But now, below the year, it’s displaying the title of each post along with the year. i.e., in a list format.

    I have changed nothing since the initial install. Everything looked fine at the time (only the hotlinked years displayed in the list).

    I’m running WP 4.9.8 in Astrid theme.

    The current plugin settings are:

    Date Format: Y
    Before / After (Year headline):
    Collapsible years?: Checked

    All other checkboxes are empty.

    Please let me know what I need to do to go back to my original display (years only).


    • Hi Roh,

      > But now, below the year, it’s displaying the title of each post along with the year. i.e., in a list format.

      actually that’s what the plugin always was supposed to do. Just change “Date Format: Y” to “Date Format: m/d” to get rid of the year in front of the post title.

      The “Collapsible years” option should just show the years. May you please post a link to your archive page?

      Thank you!

  11. Hi Oliver,
    I can’t seem to get it to show the excerpts. I activated the checkbox and entered 0 as well as 500 characters to be displayed. My front end shows the following html elements:


    I’m assuming the excerpt should be inside of cite but as you can see, nothing ends up being put there. The post does have content.
    What might be going on?

  12. Is there a way to take our archive of membership newsletters (in pdf format) and trick it to be a dated “post” so that I can use this tool?

    • Hi Louise, in case these membership newsletters are a custom post type you could just use the shortcode

      [SimpleYearlyArchive posttype=""]
  13. A last question until I have my archive exactly as I want it. I have a bullet showing between each post line, not in front of it. How do I rid myself of that?

  14. Hi There.

    is it possible only to show the years as a link? If i uncheck every option except only linked years – i have exactly what i want PLUS Date and title. I have to avoid Date and title in this case.

    would be glad to have an answer.

  15. Hi! I am a completely newbie. I found your plugin and I am still learning how to use it. I successfully managed to create an Archive to show all my posts chronologically, which is what I wanted. Now I want to change the color of the post titles (from my theme’s ugly red to my favourite blue). Searching online I get a lot of suggestions to add code to the Additional CCs, but none of them are working for me. I wonder whether this is something that is related to the plugin? Is there any way the plugin might be interfering? Or can I use it to change the colors?

    Whatever the answer, I am having a blast discovering a completely new world for me^^

    • Hi Guillermo, adding the following additional CSS should do the trick:

      .sya_container .sya_postcontent a {
        color: blue;

      Just change “blue” to whatever color you want.

  16. Wow, I can barely believe it, but it actually worked! It is like sorcery to me 😀

    This post motivated me to start learning CSS code in order to be able to work out solutions for problems myself, but I guess it might take a while. In the meantime, I have one last question for you if you don’t mind: your code successfully changed the post’s color, but the year remained red, you can see what I mean here

    Is it possible to write some code to chose the year’s color?

    Again, thank you so much for what you do, it is greatly appreciated and makes donating to these kind of projects a pleasure.

    • Hi Guillermo,

      you can use the following CSS code to change the year’s color:

      .sya_container h3, .sya_container h3 a {
         color: blue;
  17. I have just installed the program and get the following output on a page that uses [SimpleYearlyArchive], The problem is that the bullet is on a separate line.

    – “bullet”
    Sample Post 1
    – “bullet”
    Sample Post 2


    Possible cause of wrong format could be in the simple yearly archive settings page, the input box Max. chars of Excerpt (0 for default) has “100” entered and I cannot remove it or change it. I have tried clearing my cache, but to no avail. It should not matter as – Show optional Excerpt (if available)? is not checked.


    • Hi there,

      that seems like a CSS issue to me. May you please provide a link to your archive page so I can have a look at it? As a wild guess I think setting the links to display:inline; will do the trick.

  18. I have a question similar to Elisha. I have approximately 1300 posts throughout the years. I would like to know if it is possible to limit the total per page, regardless of the year.

    Or even still, just have it create a new page on a per year basis. That way when someone clicks the archive page, they still have access to all of the archives, but they are not on a single page with 1300 results.

    • Hi Billy, the plugin does not offer pagination or automatic creation of year-based archive pages, but a solution would be to create two pages: one for listing current year’s posts and one for all the other years’ posts.

      The shortcode for the current year’s posts page would be:

      [SimpleYearlyArchive type="yearly_act"]

      The shortcode for the other years’ posts page would be:

      [SimpleYearlyArchive type="yearly_past"]

      This way you wouldn’t have to creat another archive page for each year because the page with [SimpleYearlyArchive type="yearly_act"] on it will always display the current year’s posts.

      Apart from that there are ways to limit the number of posts being listed by using WordPress filters but you wouldn’t have pagination.

  19. Hello, and thank you for a wonderful plugin!

    I am wondering if it’s possible to have the list of posts expanded by default, so that the user will see the list of posts without clicking on a year? Or, perhaps even better, that the most recent year is expanded by default, and the previous years will expand when clicked?

    Sorry for asking if this question is already answered here – I found it quite impossible to navigate and search the comment section here.

    Thanks again for a great plugin!

    All the best,

    • Hi Eivind, the list of posts is expanded by default for all years unless you enable the option “Collapsible years?” in the plugin settings. So if you have the checkbox checked, unchecking it will do the trick here.

  20. Dear Oliver,

    does anyone know a way to edit the plugin, so its possible to have school years (sebtember 2018 – august 2019)

  21. Hi. I’m trying to use your plugin in a sidebar as an archive menu. Is it possible for the list of posts (within a year) to stay open when clicked and for the active post to be highlighted when this post has been opened?

  22. hallo, danke für das einfach und praktische plug-in. gibt es eine möglichkeit es für custom-post-types zu nutzen? ich nutze das CPT UI plug-in immer wieder um seiten besser zu strukturieren und da wäre es toll, das yearly-archiv auch dafür nutzen zu können.
    beste grüße, michael.

  23. I wanted a simple list without dates or years. I commented out line 543 to achieve it. I’d prefer that the year be encased in a css addressable element like or . Then I can simply display: none; to get the effect of a simple list without dates or years. Anyway, your plugin does the job – it’s just that the next time you update, I’ll have to remember to comment out the line that presents the years.

    • Hi Joseph, may you please provide a link to your archive page so I might be able to provide you a way to hide your year headers.

  24. I thinks this is a cool plugin. But I cant get it to work in my sidebar:
    I am using PHP + HTML plugin

    THIS IS the php code I am using to execute the shortcode.

    My goal is to show a “collapsed list” :
    Click on the year, and the posts for that year will show underneath

    I have both blog and premium material. I want to show the BLOG material using the “include=” option.

    • Hi Todd, the shortcode you posted seems to be stripped. May you please post it again? Thank you!

  25. Hi..Thanks for this plugin..i have installed recently..but year show in ascending order?how can i display descending order?

  26. Guten Tag Oliver,

    I really like this plugin as it is a simple and neat way to show all posts.
    However, I found that the shortcode confilcts with qTranslate-XT.
    This plugin uses shortcodes like this [:nl]Nederlandse inhoud[:en]English content[:]
    For some reason your shortcode is only visible on the first language but not under the second one. I guess it functions as an end code for qTranslate-XT (like this [:] ). Are you aware of this?
    The example can be viewed here:


  27. Great Plugin,

    but the shortcode [SimpleYearlyArchive] alone is not working! When I use [SimpleYearlyArchive type="yearly_act"] it´s working.

    cheers in advance


    • Hi Heiko, what version of WP are you running? Just tested it on a fresh WP 5.3 installation and the shortcode [SimpleYearlyArchive] seems to be working fine.

  28. Hi! Thanks for this very convenient plugin!
    Is it possible to tell the plugin to open archive entries to a new tab instead of the same window?

    Kind regards,

    • Hi Steffen, there’s no setting providing that, but maybe using JS to add target attributes to the link may do the trick.

  29. Hi Oliver,
    Thanks again for an awesome plugin!
    Is there a way I can change the font size? I tried with a CSS script but it only changed the size of the post titles, not the dates.

    Also, any way to get rid of the dot points and just have a list?

    Thank you so much,

  30. How can I display the years in a list
    2020 (50)
    2019 (50)
    rather than 2020 (50) 2019 (50) etc.
    I have looked through the comments and find the question but not the answer.
    Also, is it possible to have the months collapsed within the year? So that when I open the year it looks like this:
    Then I can click on the month to expand…
    Thanks for your help

  31. Hi Oliver,

    I like to use your Simple Yearly Archive Plugin, but have a short question.
    Is this plugin translatable by WPML for the following languages: Dutch, German, French and English.
    Thanks for your very appreciated reply.

    Best Regards,
    Staf Campforts

    • Hi Staf, yes it is compatible with WPML for any language you set up using WPML on your website.

  32. Hi Oliver,

    Thank you for your reply.
    I am testing now the free plugin and made some lists.
    I looked for the option to group the posts in a list per year. I mean, to collapse the list in groups per year. When you click on a year, the posts of that particular year will be displayed.
    Is this possible, and how to make it that way.
    Thank you for your very appreciated reply.

    Best regards,
    Staf Campforts

  33. Hi Oliver,

    Thanks for your goodwork what u did, I am really like your plugin.

    my post-type in the wordpress database is “archive” instead of “post”, Is there a code to show my posts with post-type archive on my page?

    Thanks in advance

  34. Hi, I am using it on all pages but I just want Collapsible option on one page, if I checked ‘Collapsible years?’ in backend so all pages archive posts collapsed. But I jsut want it on one page only. Is there any option to add in the shortcode to show only one page, not all pages.


    • Hi Ajay, currently it’s not possible to set all options via shortcode, but maybe in a future release.

  35. Hi Oliver,
    I’ve just installed your plugin. But it dosn’ matter how I setup the excerpt settings – they won’t be shown at my page. Is there anything what to look for when writing articles?
    Best regards

    • Hi Matthias, sorry for the late reply!

      I assume you have enabled “Show optional Excerpt (if available)?” in the plugin’s settings?

  36. Hi,

    Great plugin!

    I was wondering if there’s a way to exclude certain years? I’ve got 2020-2018, but I don’t want to display anything from 2018 is there a way to do that?

  37. Hi Oliver,

    bin absoluter Neuling und fux mich gerade mit Plugins etc durch um die Vereins-Seite zu erstellen. Dein Plug-In ist genau was ich gesuchte habe um die Veranstaltungen entsprechend darzustellen. Plugin installiert, wird auch dargestellt: “2020 (5)” wenn ich allerdings die 2020 anklicke, springt er nur nach oben auf der Seite und klappt nicht aus.. Eine Idee was ich hier falsch machen?


  38. hi there—

    i want a simple list of years, just as you have on your demo. but when i install your plugin and instert [SimpleYearlyArchive] into a html widget, all the years run together and do not appear on their own line. how can that be changed?

Leave a Comment