Title: Multiple years?
Last modified: August 21, 2016

---

# Multiple years?

 *  Resolved [eivind1984](https://wordpress.org/support/users/eivind1984/)
 * (@eivind1984)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/multiple-years/)
 * Hi! Would it be possible to show posts from multiple years? Either allowing me
   to set the number of years to go back, or just everything in the system?
 * [https://wordpress.org/plugins/smaly-widget/](https://wordpress.org/plugins/smaly-widget/)

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Plugin Author [Eli](https://wordpress.org/support/users/scheeeli/)
 * (@scheeeli)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/multiple-years/#post-4817947)
 * I just released an update with the ability to display All Prior Years.
 * Try it out and let me know what you think. If it works for you please write up
   a 5 star review:
    [http://wordpress.org/support/view/plugin-reviews/smaly-widget](http://wordpress.org/support/view/plugin-reviews/smaly-widget)
 * And please make a donation if you are able 😉
    [https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8VWNB5QEJ55TJ](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8VWNB5QEJ55TJ)
 * Aloha, Eli
 *  [essaysnark](https://wordpress.org/support/users/essaysnark/)
 * (@essaysnark)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/multiple-years/#post-4818140)
 * Love the “past years” option – totally what we need! However we’re getting some
   unpredictable results. Currently have it set to display this week / all prior
   years, yet right now (April 23) it’s pulling in posts from:
 * 4/29/13 – 5/3/13 (5 posts)
    4/23/12 – 4/25/12 (3 posts) 4/25/11 – 4/28/11 (4 
   posts)
 * We post only on weekdays so the number of posts per week in each year looks right,
   it’s just that it seems like it’s pulling in from the wrong week of 2013. There
   were posts on 4/23/13 that were skipped.
 * Separately: When we set it to pull posts from “this day”, it listed today’s post(
   4/23/14) as the top entry.
 * Regardless, it’s a sweet little plugin! Wanted to let you know of the oddities
   in case others might be seeing same.
 *  Plugin Author [Eli](https://wordpress.org/support/users/scheeeli/)
 * (@scheeeli)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/multiple-years/#post-4818142)
 * Week of the year (from 0 to 53). Uses MySQL WEEK command. The mode is dependent
   on the “start_of_week” option.
    see: [http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_week](http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_week)
 * So I’m guessing April 23 is the beginning of week 17 in 2014 but it’s at the 
   end of week 16 in 2013. I can’t really do anything about that strangeness but
   let me know if you work out a solution to that.
 * As for the problem of it listing today’s post when you choose “this **Day** of**
   All Prior Years**“, well that was just a bug in my new code. I just released 
   an updated version of this plugin that fixes that issue and also allows you to
   set where the date is displayed.
 * Thanks for reporting this stuff to me and I hope you like this plugin enough 
   to make a donation 😉
 * Aloha, Eli
 *  [essaysnark](https://wordpress.org/support/users/essaysnark/)
 * (@essaysnark)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/multiple-years/#post-4818187)
 * Thanks for the quick follow-up and the fast bug fix!
 *  [essaysnark](https://wordpress.org/support/users/essaysnark/)
 * (@essaysnark)
 * [12 years ago](https://wordpress.org/support/topic/multiple-years/#post-4818242)
 * Hi again – Any known issues with Jetpack Infinite Scroll? We recently switched
   to a new theme and added Jetpack, and now the output is a little wonky:
 * – the Display post_date option shows the wrong year for the first entry in each
   year off by 1, e.g., a post from May 2013 displays as “May 19, 2014”. If it’s
   displaying by day, then all of them are off; if it’s displaying by week with 
   5 entries requested, then only the first entry of the set is off.
    – the “all
   years” option by week seems to only be pulling in 2013 and is not going further
   back (settings are display 5 posts this week all prior years, we have near-daily
   posts since 2011 so should be getting 15 posts with this setting, only getting
   5)
 * We’re on Version 2.14.16. The widget is in the right sidebar of [http://essaysnark.com](http://essaysnark.com)
 * This version of the plugin was working great till we overhauled the site and 
   lots of stuff has changed recently so not sure where the issues are coming in
   with this but Jetpack is the main suspect. Any ideas?
 * Thanks!
 *  Plugin Author [Eli](https://wordpress.org/support/users/scheeeli/)
 * (@scheeeli)
 * [12 years ago](https://wordpress.org/support/topic/multiple-years/#post-4818243)
 * I don’t know of any conflicts with jetpack or any other reason for the behavior
   you described.
 * If you want to give me your WP Admin login or FTP access to your site then I 
   could troubleshoot this issue and figure out what is causing it.
 * You can email me directly: wordpress [AT] ieonly [DOT] com
 * Aloha, Eli
 *  [essaysnark](https://wordpress.org/support/users/essaysnark/)
 * (@essaysnark)
 * [12 years ago](https://wordpress.org/support/topic/multiple-years/#post-4818244)
 * Thanks for the reply. We’re in the middle of some big projects now so can’t investigate
   further but may circle back later.
 *  [essaysnark](https://wordpress.org/support/users/essaysnark/)
 * (@essaysnark)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/multiple-years/#post-4818253)
 * Still seeing odd behavior in terms of how many/which posts are displayed with
   a given set of options configured, but we did get one of the issues fixed.
 * The wrong date being displayed on the first post in the output is fixed by swapping
   lines 99-100 — so, to this:
 *     ```
       $SMALY_query->the_post();
       $pos[$instance['date']] = get_the_date($instance['format']);
       ```
   
 * If we can determine any patterns with the other stuff then we may pop back in
   with questions about that.
 *  Plugin Author [Eli](https://wordpress.org/support/users/scheeeli/)
 * (@scheeeli)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/multiple-years/#post-4818254)
 * Thanks for that bug fix. I released a new version with those two code lines in
   the right order 😉
 * Please let me know if you find anything else.
 * Aloha, Eli
 *  [essaysnark](https://wordpress.org/support/users/essaysnark/)
 * (@essaysnark)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/multiple-years/#post-4818258)
 * Hi again – just figured out that a source of our confusion is the wording on 
   the widget that we misunderstood.
 * We’ve got it set to Show 5 posts in this Week of All Prior Years.
 * Had thought that these settings would display 5 posts per year but actually it’s
   displaying 5 posts total.
 * Our site has posts every weekday, going back to 2010. So, we’re only ever getting
   a list of 5 2013 posts displayed – not 5 from 2013, 5 from 2012, all the way 
   back, which is what we’d expected. By increasing the number we can get more posts
   to show but then the list obviously gets quite long too. Had wanted to do 3 posts
   per year, of all years, but it doesn’t seem that’s how it works.
 * Maybe it’s just us in this misinterpretation of the language on that widget setup
   screen but thought we’d mention it in case you wanted to tweak it for clarity.
 *  Plugin Author [Eli](https://wordpress.org/support/users/scheeeli/)
 * (@scheeeli)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/multiple-years/#post-4818259)
 * Thanks for the clarification.
 * I only just added the multiple year option and I did not consider how that would
   change the understanding of what this widget could do. This new feature also 
   complicates the multitude of results you can get, depending on how you mix it
   with the other options. For example: my original intention for this new feature
   was to use it with the “Day” option, in which case you would get 1 post per year
   going back 5 years (if you have 1 post per day).
 * Obviously, the results can very quite a bit depending on how you mix all the 
   options, and depending on how frequently you create posts. Feel free to tweak
   the code to you specific needs. If you find method for producing the results 
   you are looking for, that works well and that others might benefit from too, 
   let me know and I’ll work it into the next release.
 * Aloha, Eli

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Multiple years?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/smaly-widget.svg)
 * [This Day In History Widget](https://wordpress.org/plugins/smaly-widget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/smaly-widget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/smaly-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/smaly-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/smaly-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/smaly-widget/reviews/)

 * 11 replies
 * 3 participants
 * Last reply from: [Eli](https://wordpress.org/support/users/scheeeli/)
 * Last activity: [11 years, 10 months ago](https://wordpress.org/support/topic/multiple-years/#post-4818259)
 * Status: resolved