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?
-
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:
https://www.ads-software.com/support/view/plugin-reviews/smaly-widgetAnd please make a donation if you are able ??
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8VWNB5QEJ55TJAloha, Eli
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.
Week of the year (from 0 to 53). Uses MySQL WEEK command. The mode is dependent on the “start_of_week” option.
see: https://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_weekSo 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
Thanks for the quick follow-up and the fast bug fix!
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 https://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!
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
Thanks for the reply. We’re in the middle of some big projects now so can’t investigate further but may circle back later.
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.
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
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.
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
- The topic ‘Multiple years?’ is closed to new replies.