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
Implementation / Usage
Options menu
There are a couple of options in the Simple Yearly Archive options menu.
- Date format:
The date output be customized. Check http://php.net/strftime 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.
Hi ! Thanks for this useful plugin.
This shortcode with include categories don’t run :
[SimpleYearlyArchive type="yearly" include="60,52" order="DESC"]
but
This shortcode without categories run correctly :
[SimpleYearlyArchive type="yearly"]
In the shortcode above 60 and 52 are categories IDs. Isn’t it ?
I don’t understand.
My blog is running under WordPress 3.3.1
Simple Yearly Archvie Version 1.4.3
Do you get any errors? I’m not sure the plugin still works with WordPress 3.3.1. We’re at 3.6 already. 😉
Thank you for your reply.
The reason of the problem was a conflit with settings of an other plugin (Advanced Category Excluder Widgets). This is my fault …
In fact, there is non problem with WordPress 3.3.1. But I upgraded it , by the way.
🙂
The updated plugin started showing both drafts and private posts in my archives, which freaked me out. When I updated it again, it stopped working. When I call the shortcode listed above it breaks the theme. What happened to this perfect plugin? 🙁
Hey Shamini,
what exactly does it break? May you please provide a link?
Hi Oliver,
I’ll go activate the plugin now, and call it with [SimpleYearlyArchives]. You can see what it does here: http://dysfunksjonell.no/archive/ – let me know when you’ve seen it, so I can deactivate it again. Thanks!
Hey,
Just to make sure it’s not a typo: It’s [SimpleYearlyArchive], not [SimpleYearlyArchives].
Also try increasing the memory limit if you have loads of posts: http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP
Additionally, can you enable the debug mode following these steps http://codex.wordpress.org/Editing_wp-config.php#Debug, copy the error message you see and disable the debug mode again? Thanks!
HI,
I double checked, triple checked and checked again, and there’s no typo (that was the first thing I thought about).
My files doesn’t look anything like the ones referred to in the codex, but the debug didn’t say anything regarding Simple Yearly Archive, and I really don’t have enough experience with PHP to increase the memory limit when the file doesn’t contain what the codex says it’s supposed to contain.. 🙁
Bah, I loved the plugin when it worked.
Hey,
well, if you’re okay with sending me a login to your WP site so I could see myself, that’d make things a lot easier for me to check. 🙂 If you’re okay with it, please send the credentials to scripts (at) schloebe (dot) de
Hi Oliver, thank you so much for the great plugin but I have two questions:
1.- The first question and the more important is that when I install SimpleYearlyArchive Plugin, enter in conflict with Top Commentators Widget Plugin, SimpleYearlyArchive Plugin working perfect but Top Commentators Widget Plugin stop working.
2.- How I do a page with SimpleYearlyArchive Plugin for the catgories?
Here my link archives: http://www.getafevoz.es/archivos/
Thank you Oliver 🙂
Hey there,
regarding your 2nd question, see the section “Implementation / Usage” up on this page.
Hi Oliver, and the first question please? you have a posible solution?
My second question is because when I see the section “Implementation / Usage†I not see nothing of catgories, sorry and thanks.
Hey,
just tested the Top Commentators Widget Plugin while Simple Yearly Archive was activated, and both plugins work just fine for me. Maybe another plugin is causing the issues?
Regarding your second question. Use this code:
where x is the ID of the category you don’t want to show.
Hi,
Great plugin! I have a question? Can I define what a year means?
For example I want to archive posts from september 2013 to August 2014 and so on….like a school year.
Thanks in advance
Hey tashaevien,
‘year’ means calendar year so it’s always from 1/1 to 31/12.
Hi Oliver,
Thanks for your reply Oliver! Is there a quick fix on your code, where i could possibly change what you retrieve as results? For example instead of if year = XXX to get results between september and august or something like that? Is there a fast work around?
Well, as you can see here http://www.schloebe.de/archiv/ the list is separated by year… what’d be the seperator if you choose to use results between september and august? That’d pretty much be a monthly archive, so I’m sorry to say there’s no quick workaround I can think of.
Hi Oliver,
thank you for this great plug-in.
It works very well and it looks as simple and great as I could wish for!
One question:
Is there a maximum number of posts the plug-in can handle?
Right now, there are 646 posts altogether and most of them are in the archive. The archive is not shown when the shortcode is included in its basic version.
But it is shown, when “yearly_past” is added.
This is the site: http://www.berlinkonzerte.de/archiv/
Thank you for your kind attention!
Ben
Well, could be a memory limit. Do you get any errors or just a plain white site?
Hi Oliver,
thanks for your reply.
Could be a memory limit, yes.
The site does not stop loading, see here a test site I just created to show you: http://www.berlinkonzerte.de/test/
What do you recommend?
Thanks again!
Ben
Where do I see the issued archive page at the link provided?
That is the point: Due to the amount of posts, you do not see anything but “loading circles”.
The only difference between
1. http://www.berlinkonzerte.de/test/
and
2. http://www.berlinkonzerte.de/archiv/
is that at 2. I removed some items by limiting the plugin to “yearly_past”
Can I send you the log-in data via email? mine is info (at) medians (.) de
Thank you!
Ben
Hmmmm, I don’t see any signs of my plugin in the source code of http://www.berlinkonzerte.de/test/ Sure you’re calling the plugin on that page?
Hi Oliver,
thanks for your reply (I cannot answer to your last reply so this is why I answer here).
Regarding your question:
Yes, the plug-in is called on the page, it is just the amount of posts that is different between the two versions I sent you. Everything else is the same.
– on the site /ACHIV I use “[SimpleYearlyArchive type="yearly_past"]”
– on the site /TEST I use “[SimpleYearlyArchive]”
So I am still pretty sure that your initial thought, a memory limit, is the reason for the problem.
Is there a possibility to increase the maximum number of posts (=the memory limit you were mentioning before) the plug-in can handle?
If that is not possible: how could I leave out only posts from earlier years? (type=”…”)
Maybe I can send you the log-in data so that you can take a look?
Sorry for bothering you again, your help is appreciated a lot!
Thank you!
Benedikt
Hey Ben,
no prob at all. 🙂 Feel free to send the login data to scripts [at] schloebe [dot] de
As for a quick shot, you could try using [SimpleYearlyArchive type="yearly_act"] to only show posts from the current year (2013). Apart from that, here’s how you could try to increase the memory limit: http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP
Hi Oliver,
thank you for your advice, it worked perfectly!
(a shame, I asked you, you answered very helpfully, and I forgot to thank you right on time, sorry …)
Carry on with your great work!
Ben
No problem, Ben! Happy I could be of any help! 🙂
Hi, thanks but I encounter the following Notice: Undefined variable: listyears in /home/…/public_html/…/wp-content/plugins/simple-yearly-archive/simple-yearly-archive.php on line 251
When using exclude/include parameter, only
Any idea how to fix it?
Hi Lea, I just released version 1.4.3.2 that fixed the issue. Thanks! 🙂
Really thank to you Oliver for this quick reply and 😉 upgrade
but for now there is the following notice
Notice: Undefined variable: listyears in /home/…/public_html/…/wp-content/plugins/simple-yearly-archive/simple-yearly-archive.php on line 277
I’m using [ SimpleYearlyArchive include=”23″ ] for example, then in fact 1rst year list is right, but next there are posts of these 2 years, it should show only posts of 2d year, etc
Good luck
Did you update the Simple Yearly Archive plugin to version 1.4.3.3? 😉
Perfect 😉 for now… v1.4.3.3 doesn’t display any alerts, many thanks @oliver for this new upgrade
Greatish. 🙂
Hi, thanks for the awesome plugin. I have a little problem with it. When I click on the year then it expands my news list, I choose the news and go to read it and now if I go back to the news list (just going back) then the news are not expanded anymore and I have to click again on the year number. How to change that so, that if I come back from reading then the news list are still expanded?
I know it can be kinda cumbersome, but I’m intending the plugin to be as lightweight as possible. Most people open links with their middle mouse button anways, which opens links in a new tab/window, so when they close the new tab, they’re on the archive page again. 🙂
Hello!
I’ve used this plugin for several years on a site I manage. Now I’m relaunching the site—building from scratch—and hoped to continue using it. But when I paste the shortcode into a page, not only does it not display the archive, but it also removes my footer and sidebar. I disabled the other three plugins I’m using and it didn’t help. Any ideas? I’ve upgraded to the latest release of both the plugin and WordPress.
Thanks!
Hey Steve, have a link? Looks like you have a PHP Memory issue, which means that you should try increasing the PHP memory that WordPress can use. More here: http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP
Thanks Oliver, I’ll give that a try!
I’m building the site locally before launching, so unfortunately I don’t have a link. I’ll give the memory increase a shot though.
Lemme know how it goes!
Hello Olivier, thanks a lot for your plugin. I have just started to use it today and it seems like i have a problem. The plugin is not showing all of my post just the ones that apparently have a certain category (its in spanish but for example the plugin is just showing the post that have the “Documents” category). I have created a static page and im using this shortcode : [ SimpleYearlyArchive].
I will really appreciate your help.
It should be showing all your posts if you don’t have a parameter given in the shortcode. May you please give me a link?
I can’t get any exerpt to show only title. I use WordPress 3.8 and theme Twenty Thirteen. Nice plugin!
The plugin lists the post titles by default, no need to enable excerpts display. Or what do you mean?
I mean that it would be nice to see short exerpt in a list below every title. I thought that is possible because you have an option for that in a settings page.
Hey Juha, if a post does have an excerpt, it will be listed. Check if your posts have excerpts.
Two things:
1. Does it support pagination? Or is everything displayed on one page?
2. Is it possible to include the first attached photo of each post as a thumbnail?
Thank you.
Hi Mathew,
1.) No, a single-page archive will be generated.
2.) Well, I’m not sure if this would break the clean nature of the plugin. What do you think?
i need post date sunday 27th and want to archive posts from september 2013 to August 2014 on years please help me for that thing
that plugins help for me
Hey BaljitJanuary, the plugin does only support calendar year periods (Jan 1st to Dec 31st).
Hallo Oliver
Gibt es eine Möglichkeit, in einer der Dateien des Plugins die gewünschte Zeitspanne von Hand einzutragen?
Ich wäre sehr daran interessiert, da ich mein Archiv in “Schuljahre” gliedern möchte.
Danke jetzt schon für eine Antwort und vielleicht sogar Hilfe.
hama
Hallo hama, das ist leider nicht so einfach, wenn auch nicht unmöglich. Du müsstest den Query quasi insofern anpassen, dass du ein Startdatum als Unix Timestamp nimmst (z.B. September 2013), dann 12 Monate drauf rechnest und dann in der Query “SELECT post_date BETWEEN AND ” abfragst.
Hallo Oliver
Würde ich das anstelle von:
$_query[] = ‘AND YEAR(post.post_date) = “‘ . intval($aktuellesJahr) . ‘”‘;
eintragen?
Hmm, ich nehme an, es ist (leider) aufwändiger und somit für mich persönlich nicht realisierbar, da zu wenig PHP-Kenntnisse vorhanden sind.
Gibt es eine Möglichkeit, dich in dem Sinne anzufragen, ob du mir diesen Hack schreibst (inkl. “donate”) oder ob du das evtl. sogar als zusätzliche Auswahlmöglichkeit in dein Plugin einbaust. Dies könnte allenfalls eine “Marktlücke” sein, da ich bis jetzt kein einziges Archiv-Plugin gefunden habe, welches die Auswahl der Daten über die Jahre hinaus bietet.
Liebe Grüsse
Hans
Hallo hama,
ich möchte mein Plugin ungern aufblähen mit Features, die vllt. 1% der Nutzer nutzen würden.
Was ich mir aber vorstellen könnte, wäre, daraus ein eigenes kleines Plugin zu machen, ggf. mit weniger Optionen als sein “großer Bruder”. 🙂 Das Problem, welches ich nur sehe, ist, dass jedes Schuljahr ja anders stattfindet jedes Jahr, d.h. das Plugin kann nicht jährlich davon ausgehen, dass die Zeitspanne vom 1.1. bis 31.12. geht. Es wäre also quasi weniger automatisch, und man müsste für jedes Schuljahr manuell eine eigene Seite anlegen, mit dem passenden Shortcode drin, der Start- und Endmonat vorgibt.
Ich schau mal, ob ich das irgendwie ins Plugin einbinden kann, ohne die Mehrheit der Nutzer zu verwirren. 😉
Hallo Oliver
Es kann grundsätzlich immer die gleiche Zeitspanne für die Schuljahre definiert werden:
01.08. bis 31.07.
Klar sind die letzten Wochen im Juli und die ersten Wochen im August Ferien, was jedoch keinen negativen EInfluss auf das Archiv haben würde.
So ein Mini-Plugin für diesen Zweck wäre natürlich voll cool … 😉
Liebe Grüsse
Hans
Lieber Oliver
Konntest du vielleicht schon etwas bewerkstelligen mit der Archiv-Zeitspanne 01.08. bis 31.07.?
LG
hama
Hallo hama,
leider komme ich im Moment zu nix wirklich, was mit WordPress zu tun hat. Zu viel zu tun im Job. Ich hoffe, ich kriege das diesen Monat noch hin. 🙂
Hallo hama, Version 1.7.0 hat nun die Möglichkeit, eine eigene Zeitspanne zu vergeben. Über den Shortcode sähe das z.B. so aus:
Die beiden Zahlen sind von-bis UNIX timestamps, die man z.B. hier generieren kann: http://unixtime.de/
Nicht optimal, aber so musste ich keinen weiteren Parameter einführen, der andere Nutzer verwirrt, die die Funktion nie nutzen. 😉
Hallo Oliver
Vielen Dank, das hat perfekt geklappt. Ich hab’s schon eingebaut. 🙂
Cool, dass du extra ein Update gemacht hast!
Liebe Grüsse
Hans
Hi Oliver,
great and easy to use plugin. Thanks. One question: is it possible to add custom post type articles to the archive?
Hey Steffen,
yep, just use the shortcode like
[SimpleYearlyArchive posttype="my_product"]
Thanks Oliver, works… but the custom post type and the normal posts … can that work in one archive?
Hey Steffen, would be possible but isn’t creating post types aiming to separate posts from the normal ones? Why list the normal posts along with the custom post type posts? Wouldn’t categories be better for that matter?
Thanks Oliver for your answer. I was pretty sure to do sth good. But you are right. Everything can also be done in categories instead of custom post types. So I could solve this this way. Thank you.
Thank you for this plugin, Oliver.
Hallo Herr Schlöbe,
erst mal vielen Dank für das tolle Plugin. Ich hätte einen erweiterungsvorschlag für das Design. Leider weiss ich nicht wie ich dies lösen könnte.
Ich würde gerne alles im jquery oder jquerymobile style anzeigen.
Anbei ein Link zu einer Demo wie ich mir das vorstelle, jedoch natürlich ohne funktion.
Vieleicht könnten sie dies in ein Update einbringen oder vieleicht mir sagen wie ich es lösen könnte.
Nochmals vielen Dank
Gruss
Richard
http://www.mv-lutzenberg.ch/test/
Hallo Richard,
es bedarf sicherlich einiges an CSS-Knowhow, aber dieses Layout lässt sich jetzt schon mit CSS umsetzen. Jedes Element meines Plugins hat spezifische CSS-Klassen und -IDs, die man dafür ansprechen und nutzen könnte. 🙂
Guten Abend Oliver,
vielen Dank für die rückantwort. So wie es tönt konnte ich dich nicht für ein grösseres Style-Update begeistern und überzeugen 😉 Leider habe ich kein wissen in css und bis ich dies gelernt habe sind wir bei WP version 10 angekommen 🙂
Ich lass mich mal überraschen, vielleicht gibt es ja noch Heinzelmännchen oder ein tolles Oster-Weihnachtsgeschenk
Gruss
Richard
Das Problem ist, dass ich das Design nicht vorgeben kann, da jedes WordPress Layout anders ist. Bei dir mag das Aussehen wie bei jQuery Mobile passend aussehen, aber bei einem anderen Theme würde das vllt. seltsam aussehen. Deswegen kann ich nur die Mittel mit den Weg geben, damit sich jeder die Ausgabe des Archivs seinem Desihn anpassen kann. 😉
acho ist das…
kannst du mir evt noch einen hinweis geben mit welchen dateien ich mich da beschäftigen muss. Nur mit der css datei oder auch mit den allgemeinen php dateien deines Plugins?
Nochmals vielen dank für deine bemühungen
Nur mit der CSS-Datei deines Themes (style.css). Die erforderlichen CSS-Klassen bringt mein Plugin von alleine mit.
Hallöchen,
Das Archiv als Seite sieht ja ganz gut aus… Aber kriege ich das ganze auch irgendwie in einem Widget untergebracht, quasi als Ersatz für das normale Monatsarchiv-Widget in der Sidebar? Oder wäre dafür ein weiteres / anderes Plugin nötig?
(kann gut sein, dass ich mal wieder den Wald vor Bäumen nicht sehe…)
Hallo Rafael, ein Widget gibt es nicht. Allerdings gibt es einen kleinen Trick:
1.) In der functions.php deines Themes folgende Zeile einfügen:
2.) Ein Text-Widget erstellen und dann einen Shortcode des Simple Yearly Archives eintragen, z.B.
Ok, besten Dank!
Just the plugin that we need! Is there a way to pull and sort by date from a custom field?
Hi Mark, not yet, but maybe in a future version. 🙂
Hello!
Suddenly, maybe since the last automatic update?, the plugin isn’t working for me anymore 🙁
It just says: “Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 93510 bytes) in /customers/c/f/8/jemaco.se/httpd.www/wordpress/wp-content/plugins/simple-yearly-archive/simple-yearly-archive.php on line 417”
http://jemaco.se/sparat/inlagg-per-ar/
What can I do to make it work again?
Hi Jennie, take a look over here: http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP 🙂
Hi, I’m having trouble with the exact notation of the shortcode. If I want to exclude category id3, i guess I the following shortcode, but it still shows all categories: [SimpleYearlyArchive ExcludeCategoryIDs="3"]
Hey Ries, for the shortcode notation it’s: [SimpleYearlyArchive exclude="3"]
Lieber Oliver Schlöbe,
ich versuche vergeblich, das Plugin auf einem Blog meiner Multisite zum Laufen zum bringen. In ein Widget im Blog-Sidebar habe ich [SimpleYearlyArchive type="yearly"] geschrieben, aber nichts tut sich (außer dem Plugin-Footer, den ich zu Kontrollzwecken aktiviert habe). Beiträge sind ausreichend vorhanden, das WP-Standardarchiv zeigt entsprechend eine lange Liste an. Habe ich etwas übersehen? Oder gibt’s ein Multisite-Problem?
Hi, ich bin mir im Moment nicht sicher, ob Shortcodes in Widgets standardmäßig unterstützt werden. 🙂
Hi Oliver,
es gibt ja nun einige Optionen, was man je Archiveintrag an zusätzlichen Infos einblenden kann.
Kategorie, Kommentaranzahl, Excerpt, Autor, etc. Aber was ich vergeblich suche und eigentlich genial fände, wäre das Featured Image je Eintrag unter dem Titel einblenden zu können (mit entsprechender Möglichkeit die Größe zu wählen).
Leider bin ich nicht im Stande das selbst zu realisieren. Aber vielleicht ist das eine willkommene Anregung für die nächste Version?
Hi Tom,
ich hatte die Anfrage schon öfter, habe mich bisher aber dagegen entschieden, denn der Pluginname “SIMPLE Yearly Archive” soll Programm bleiben. Mit Featured Image wäre es keine einfache Jahresliste der Beiträge mehr, sondern fast schon ein eigener Loop (also Post Listing).
Hm, kann ich verstehen aber da optional wäre es ja nicht sonderlich hinderlich. Aber klar, Entscheidung liegt hier ganz klar bei dir.
Schade. Danke für die schnelle Rückmeldung.
Hi Tom, generell ausschließen möchte ich es nicht, aber bisher schreckt mich die Ausgabe etwas ab. 🙂 Nimm z.B. mein Archiv: http://www.schloebe.de/archiv/ Würde ich dort Bilder mit anzeigen lassen, dürften die entweder max. 30px hoch sein, damit sie vor jeden Eintrag passen, oder es sind dann dort große 100x100px Thumbnails, die die Liste immens vergrößern, denn es gibt ja nur die Überschrift zum Anzeigen. Für mich passt das irgendwie nicht zum Konzept des Plugins, daher habe ich mich bisher dagegen entschieden.
Wenn du dir meine Header-Images anschaust, dann siehste warum ich das gerne hätte 😉
Würde das lange Image gerne unter dem Titel jedes Posts haben… nur hab ich keine Ahnung wie ich das selbst realisiseren soll…
Hi Tom, habe mal eine Testversion mit Post Thumbnail Support erstellt: https://www.dropbox.com/s/a51ucmkj4orutb7/sya_post_thumbnails.zip?dl=0 Die ZIP einfach installieren. Wenn alles glatt geht, veröffentliche ich das für alle. 🙂
Hi Oliver, habs gerade installiert und eingestellt und siehe da, funktioniert und zwar so wie ich mir das dachte 🙂 Perfekt!
Ich seh jetzt zwar die Probleme die du angesprochen hast, aber dennoch denke ich, das es bei einem visuellen Blog wie meinem hilfreicher ist, die Bilder zu sehen als nur die Überschrift. Von daher, ich bin sehr zufrieden und danke dir vielmals! 🙂 Kann ausgerollt werden! 😉
Alles klar, dann entlasse ich die Version in die raue feindliche Welt da draußen. 🙂
Can I just say what a comfort to find a person that actually knows what they are discussing over the internet. You actually understand how to bring a problem to light and make it important. More people ought to read this and understand this side of the story. It’s surprising you aren’t more popular since you certainly possess the gift.
Please change line 200 in simple-yearly-archive.php to something like this so :
$linkyears_prepend = ‘‘;
so if you are showing only some cathegory the year link will point to it
sry for english. tx for respond
http://justpaste.it/h1ak
Hi Youda, limiting the Archive page to specific categories doesn’t neccessarily mean that the yearly archives page should be limited too. 🙂
i think it is. if someone is looking on Archive page of some cathegory and clicks on year, i think he only want to see posts from that cathegory from that year
I see your point, but why would someone click on a year and expect a filtered yearly archive page when he’s coming from a filtered list already?
There is certainly a lot to find out about this subject. I like all of the points you’ve made.
Hi,
I would like to display only the years along with the number of posts in parenthesis but not the post titles per year. Is this possible?
Thanks
Adding this to your theme’s style.css should do the trick:
Hi,
I noticed the following:
When following the link from the Year (e.g http://mysite/?m=2014&lang=en) the posts displayed belong to all the categories of the selected year (e.g. 2014) and not only to the category I have selected. How can this be resolved?
See Oliver? 😀
Change line 200 in “simple-yearly-archive.php” to http://justpaste.it/h1ak
Hi Youda,
thanks for the code you provided. I tested it and unfortunately it does not work. I get a fatal error message when changing the code. Are you sure it’s right?
Thanks
Hi guys, the problem with the code is that while Simple Yearly Archive allows to filter the archive list for multiple category IDs, WordPress doesn’t. So when someone includes the categories 1,3,5, and clicks the Year link, it won’t work. The link would look like /2014/?cat=1,3,5 but WP does only allow single category filter IDs, so it would filter the list to category ID 1 only and the list wouldn’t be accurate nevertheless.
Hi Oliver. Thanks for your answer.
I have 3 post categories. My purpose is to get all the posts of each category (not from multiple) for each year for e.g. 2014 with cat id ’12’.
The problem is that i get the posts of 2014 from all the categories instead of only “12”. The code of Youda didn’t help also. I work in wordpress 3.9.1.
It works for me. I know that it doesnt wokr for mulitple but i am not usiong it. Maybe Oliver could help you. I am not a web developer and i just changed what i needed. i know it isnt done in proper way.
try changing the right line.
https://justpaste.it/h52g
With a couple of changes seems to work only for my default language (Greek). Your code changed: https://justpaste.it/h55z (with red letters the changes). What can i do to work in an second language (english)?
oh i dont know why but “justpaste.it” changed the braces from round to square. of course they need to be round. I think you just need to find out what URL works on your web. For me “/2014/?cat=100” works so my code alse works.
How I display posts only for one category? i.e, without put all the others in the “exclude” parameter.
Hi miguel, use the include parameter, e.g.
where 10 is the category ID.
Hi, I do think this is a great site. I stumbledupon it 😉 I will return yet again since i have book marked it. Money and freedom is the best way to change, may you be rich and continue to guide other people.
Hi,
Thanks for this plug in.Its really good one.
I need to display year wise category list like 2014 2013 2012 … etc.
But i am using short code like this [SimpleYearlyArchive type="yearly_past" include="2" ] and [SimpleYearlyArchive type="yearly" include="2" ]
It shows like 2012 2013 2014.
I need present year is first .
Hey Venu, did you happen to enable “Reverse order” option in the plugin’s settings?
Thank you,
Yes i updated the settings now its working perfectly.
But still i am having one problem when i am using [SimpleYearlyArchive type="yearly" include="3"] this short code all list will be displayed perfectly, But that list shows when user logged in to the site only.
If we are visiting site that list are not displaying properly,it shows only present year
Thank you for your reply. I checked that one Reverse order is enabled.
But still i am having some other problems.
when i am using this short code [SimpleYearlyArchive type="yearly" include="3"] its displaying values will be correct but it showing when we logged in to the site that time only shows exact out put. But without logged in its not displaying all values shows only present year.
Hey Venu, having different output for logged in and logged out users sounds like a Cache issue. Do you happen to have a cache plugin installed that could cause different output for not logged in users (i.e. outdated cached output)?
Is there a way to show only posts of certain tags?
Hi suki, Happy Holidays! Showing posts of certain tags is not possible, maybe in a future release. 😉
Would love if it did. 😉 Would be awesome. Thanks for the quick reply!
Would it be possible to show yearly archives as a drop down and not a list?
Not yet, but maybe in a future release. 🙂
Is there an issue if this plugin is used on more than one page in a site? I set up the shortcode on a single page with this:
[SimpleYearlyArchive include="24"]
and it worked perfectly. Here’s that page: http://www.capitolpagealumni.org/events/past-event-recaps/
Then when I tried to recreate it with another ID on another page, it displays other categories. For instance, category 27 only has 1 item. This is the shortcode:
[SimpleYearlyArchive include=“27"]
but the page displays posts from many categories. Here is the other page: http://www.capitolpagealumni.org/eyewitness-to-history/personal-stories/
Any idea why this would happen?
Thank you
Hi Gino, there’s no problem when using the plugin on more than one page.
One thing to consider is that the plugin does not only show posts that are associated to a particular category exclusively, but also if the category selected with include=”27″ is IN the list of associated categories for a post.
Also, is category 27 a parent category with child categories?
No, we have no child categories at all. Category 27 only has one post so far, so shouldn’t only one archive link appear?
Maybe I don’t understand how the plugin works, but then why would it work on one page and not others?
Please disregard my previous post. For some reason it is working correctly now. I’m not certain, but I think I may have made an edit, then clicked Preview page, then made an edit to the PREVIEW page and not the actual page that was open in another tab. So, the plugin works like it is supposed to. I’m just careless. 🙂
Thanks!
Great to hear, Gino! 🙂
Is there a way to default load only the current year and load other years when a user clicks the link for that corresponding year?
Hi Mike, you could create several pages and add shortcodes to the content like for the current year: [SimpleYearlyArchive type="yearly_act"] For other years create specific pages like “Archives: 2014” and add the shortcode [SimpleYearlyArchive type="2014"] etc.
Follow-up question: Is there a way to show in a single archive page the posts of a subset of years (like 2013 AND 2012 AND 2011) or pick a year and display all posts in that year AND all posts in years previous?
Thanks again.
Hi Mike, there is. Try
[SimpleYearlyArchive type="unixtimefrom-unixtimeto"]
. For 2011 through 2013 this would be[SimpleYearlyArchive type="1293836400-1357081199"]
For more information have a look at the “Implementation / Usage” section above.
Hi, I’m having a little language problem when displaying short month names. Do I call SYA by a shortcode in a page everything is fine. When I call SYA by PHP in order to add an archive to a particular page the month names are in english?!? The whole site is set for german. What am I doing wrong?
thanks for your help
Daniel
Hi Daniel, I just released version 1.7.2, please check if that resolves your issue. 🙂
Hi Oliver,
Hey cool! Yes, that solved my problem. Many thanks for your support.
Grüsse 🙂
Daniel
I cant seem to work this plugin in my page. i think im missing something. how can i put this in one of my pages. my wordpress version is 4.1.1 thanks
Hi diana, did you check the “Usage” section at the top of the page?
Hey Oliver,
Thanks for a great plug-in and for maintaining it.
The new customizable date field makes no sense to me. I’ve read through the linked file about the date string, and I can see the variables I want to use, but no matter what I enter into the field all I ever get on the front-end is %x where the date should be. What am I doing wrong?
M.
Oh, wait. Disregard. I figured it out. My Cache plug-in was keeping me from seeing the changes rendered. Thanks!
🙂
Quick question – is it possible to manipulate the excerpt settings via shortcode? We use the plugin on a number of pages and we don’t want excerpts on all those pages. Thanks!
Hi Chris, you cant manipulate setting, but you could hide the excerpts on specific pages via CSS.
A feature that would be cool: have an option to have the categories (when shown) “clickable” to go the specific category archives…
Hi! This is great, but I seem to be having a problem. [SimpleYearlyArchive] doesn’t work in my Archives page. Nothing shows up at all. But if I use the shortcode [SimpleYearlyArchive type="yearly_past"] it works fine. But I want to use the first one so I can also include this year in the archives. Not sure what the problem is! Any help you could give me would be appreciated! Thanks.
Hallo!
Tolles Plugin. Lässt sich der Aufzählungspunkt ändern oder entfernen?
Gruß – Andreas
Hallo Andreas, das Aussehen lässt sich natürlich per CSS anpassen; darunter ist auch die Möglichkeit, die Aufzählungspunkte auszublenden.
Hi Oliver,
I love your Simple Yearly Archive plugin! I wonder if the plugin is stripping html from the excerpt field, and if so can I make it not do this?
I installed a plugin called Advanced Excerpt [ https://wordpress.org/plugins/advanced-excerpt/ ] so that I can link to articles and PDFs in the excerpt. The links show in a normal WordPress post archive, but not on my Simple yearly Archive listing. My page is http://varanasi.mit.edu/publications/
Thank you,
Suzana
Hi Suzana,
sorry for the late reply! Well, for the excerpt output I’m using the built-in WP function the_excerpt() which strips HTML by default. The plugin author of “Advanced Excerpt†does state that himself: “Why do I need this plugin? The default excerpt created by WordPress removes all HTML.â€
The problem why it may not be working with my plugin might be that the “Advanced Excerpt†plugin is only compatible up to 4.0.7 and was last updated almost a year ago. I’m not exactly sure but since we’re at WP 4.3 already, there might be a lot that has changed in the API that plugins utilise.
A fascinating discussion is worth comment. I believe that you need to write more about this subject matter, it may not be a taboo subject but usually folks don’t discuss such subjects. To the next! Cheers!!
<a href="http://elbanatgames.blogspot.com"العاب بنات تلبيس
Hi there, great plugin, slick, simple, fast. Yet I wonder: is there a way to add a html code (like a br or hr) after every entry. Since the preview image is so close to the next month / date, it is a bit confusing. Especially in what appears to be a very long list / page. I also would love to have a pagination, but as I read here, it is not possible nor planed to be implemented. This would make this plugin not just good but perfect.
Thank you in advance for your answer and support.
Enkidu
Hello Oliver,
I’m not sure what options I need to check in order to show the year in collapsed form (like in your demo). I have tried many combinations.
I’m using the shortcode [SimpleYearlyArchive] and always get all years in expanded form with all post visible.
WP 4.4
Thanks in advance.
Hallo Oliver,
habe das Plugin Installiert und auch eingerichtet. Nur leider komme ich bei Datum nicht weiter. Und nach dem Speichern wie kann ich das Archiv aufrufen unter /archiv finde ich nichts.
Hallo Oliver,
ich habe bei meinem Archiv immer einen Zeilenumbruch nach jedem Aufzählungszeichen. Ich hab schon in den CSS Dateien gesucht, aber nichts finden können.
Danke für das klasse Plugin.
Gruß, Michael
Hi Oliver, ich möchte gerne im Archive die Jahre als Hauptauswahl anzeigen, darin dann die Monate. Im Hello Oliver, kann ich das im Simple Yearly Archive Plugin einstellen wenn ja wie? Habe schon alles probiert, es erscheint immer Auswahl nach Monat. Ich hätte gerne Auswahl nach Jahr.
Gruß Helmut
Hallo Helmut, das Plugin stellt die Beiträge bereits in Jahresform dar.
Genau was ich gesucht habe! Danke.
Leider erhalte ich nach Aktivierung folgender Fehler:
Warning: Creating default object from empty value in /***/wp-content/plugins/simple-yearly-archive/simple-yearly-archive.php on line 181
Just started to receive 500 Error, any suggestions where to start troubleshooting?
I have tried different variations using the shortcode but everything is coming up 500.
Hi,
I’d like to use this to display my reading list for each year (1 post per book with cover as featured image).
While I can filter to display only the correct category for a specific year, I’d like to:
1) hide the post titles and only show the book covers as thumbnails
2) display it as a grid, instead of having only one image per line
Is that possible?
Regards,
Michaël
Maybe there are other (more efficient?) ways to do it, so any feedback would be welcome, but for now I’ve played a little bit with the CSS and have been able to display the grid as I wanted.
Here is what I added to the CSS:
#sya_container ul {
list-style: none;
}
#sya_container ul li {
display: inline-block;
vertical-align: middle;
margin: 0 5px 5px 0;
}
.sya_postcontent {
display: none;
}
.sya_postimg {
float: left;
}
You can see how it looks on my site: http://michaelniessen.com/my-reading-list/
Instead of creating multiple pages (one for each year), I’ve decided to keep it all on a single page, at least for the time being. It’s possible to add links to a specific year anyway, just as with the “anchored overview” on top of the page.
Thanks for that nice little plugin.
Regards,
Michaël
I’d like to create an archive page for my site, http://karenivy.net. Your plugin seems best, but – I can’t get it to work. I run WordPress 4.5.2. I installed SimpleYearlyArchive, but I can’t get it to expand the years to display the posts by month. I got it to do this just once, and ever since it just gives me a year, with a link, with a count, but it won’t expand the link to display the posts. Can you suggest what I may be doing wrong? Here’s my configuration:
Date format is M-D
Collapsible Years is checked
Anchored Overview is checked
Show post count for each year is checked
Reverse order is checked
Separater and Before | After are as they default (what is the “Before | After” anyway?)
Hi Karen, as the plugin name implies, it only supports listing the posts by year. What you’re probably searching is this template tag: https://codex.wordpress.org/Function_Reference/wp_get_archives
Hope that helps.
Thanks for your suggestion. In fact, I was able to make your plugin do very close to what I want, by changing these settings:
Checked Linked Years instead of Collapsible Years
Changed Date format to M-d
I’ll take a look at the template tag, but right now I’m happy with what I have. Take a look at the archive here:
http://karenivy.net/archive/
Hi,
I am using your plugin on 2 blogs. My first blog displays the archive beautifully. The second blog has only 2 posts yet. But the post titles won’t show in the archive. Have a look here:
http://healthyearthhealthyyou.com/archives/
Do you have any idea why this is happening?
Thanks,
Irina
Hi Irina, do you happen to have any Multilingual plugin installed?
Yes I do. Is your plugin not working with a multilangual plugin?
Well, I tested it with WPML only. 🙂 What multilangual plugin are you using?
I am using Polylang.
Ok, that one is new to me. 🙂 I’ll have a look at it and see how to support that one.
Thank you!
Hi Irina, I just released version 1.7.5 that introduces Polylang support. 🙂 Please let me know if it’s working for you now.
It’s working! Thank you so much! 🙂
Hallo Oliver,
ich nutze dein Plugin und finde es sehr gut. Habe es mir aber so umgeschrieben, dass die Ausgabe nicht als Liste erfolgt, sondern als Tabelle. Das hat den Vorteil, dass Artikel mit einem langen Title nicht unschön umbrechen und sich mit dem Datum vermischen. Mit Tabelle sieht es viel ordentlicher aus. Problem ist aber, dass wenn jetzt ein Update kommt, was gerade geschehen ist, meine Änderungen futsch sind und ich es immer wieder anpassen müsste. Daher meine Frage, ob Du nicht auch so eine Option integrieren könntest -> Ausgabe als Tabelle. Das wäre ziemlich genial. Dann könnte ich mir das Anpassen sparen und wäre auch updatekompatibel. Und ich denke für viele wäre eine Tabellenausgabe auch interessant. Vielen Dank für alles!
Viele Grüße
Christian
Hi Chris, kannst Du einen Link zu Deinem Archiv posten? Viele (wenn nicht sogar alle) Sachen kann man mit reinem CSS lösen, und ich habe mein Plugin mit vielen Selektoren ausgestattet, sodass man eigentlich jede Ausgabe mit reinem CSS erreichen kann, die man möchte. Ich kann mir das ja mal anschauen. 🙂
First i want to thank you for making this plugin !
But i have a problem to output posts of custom type made by another plugin called WP BLOG AND WIDGET – in debug mode i see “Trying to get property of non object”, so i tried to output “normal posts” with posttype=”post” and it work fine. I checked the db to compare and see differences between posts of normal type and custom posts type”blog_post” … there is no differences.
Maybe any suggestions ?
Hi Mike, may you please post the entire debug message? It’ll be helpful in tracking down the issue. Thank you!
Hi Oliver, Thank you for your great plugin.
I have a question, my client requires a page where there is a list of years on the sidebar and the posts for that year on the content area. With your plugin I can make the list of years, but is there any way that the posts for that year appear on the content area NOT in a new page?
Thank you!
Hi Mauricio, that most probably requires custom coding as my plugin doesn’t cover that usage scenario.
Hi Oliver, is there a way to include more than one custom post type in the archive?
Hi kief, currently not but I’ll be adding this soon. 🙂
You can now add a commaseparated list of post types. 😉
wow.. that was fast!!!
thank you!
just other two things…
1) I can’t make the collapsible years works… if I click on the year (showed one next to the other like: 201620152014…etc) I get this error in the console:
” VM518 :342 Uncaught TypeError: Cannot read property ‘display’ of undefinedonclick @ VM518 :342″
any idea can it be?
and
2) I’d like to create the archive of two custom post defined not from the published date, but by a custom post meta (a date custom field)
Can you give me some hints in how I can hack your great plugin to do so?
thanks again
Hi kief,
1.) May you please link to your archive page with the mentioned error? Thank you!
2.) Here’s the line you would need to change (changing it to your custom field name should be working): https://plugins.trac.wordpress.org/browser/simple-yearly-archive/trunk/simple-yearly-archive.php#L154
Hi Oliver,
you can check the error I get here:
http://dev.studioesseci.net/archivio/
About the second point, thanks to your suggestion, I managed to order the post by my metakey, but the date shown on the archive are still the post publish date.
I see that here
https://plugins.trac.wordpress.org/browser/simple-yearly-archive/trunk/simple-yearly-archive.php#L167
and here
https://plugins.trac.wordpress.org/browser/simple-yearly-archive/trunk/simple-yearly-archive.php#L213
you used ($post -> post_date) how would you suggest to change it to get the meta_key instead ? I know this is far beyond your support, but I’m new at php and wordpress and any help would be really appreciated
thank you!
Hi kief, regarding your first issue I think I found the culprit. Could you please add header Tags (such as h1, h2 etc.) into the plugin’s settings page for “Before / After (Year headline)” and check if it’s working please.
For your second issue, in order to get the meta key of a post, try this instead of
$post->post_date
:get_post_meta( $post->ID, 'your_key', true )
Hi Oliver, why I can’t list attachments?
[SimpleYearlyArchive posttype="attachment"] returns me that no post was found.
WordPress 4.5.4
SimpleYearlyArchive 1.8.0
Thanks
Hi Luiz, I’ll have a look at it!
Ok, thanks!
Nothing yet? 🙁
Hi Luiz, I already know what’s causing the issue. The issue is that for performance reasons I am grabbing the posts via SQL query from the table wp_posts. As attachments use another table, it won’t find any attachments. Plus, attachments use different functions to generate links and get attachment info compared to posts so I’d have to change quite a lot to make the plugin list attachments.
Let’s see if I can get it to work though. 🙂
Thanks!
Hi Luiz, I justed released version 1.8.1 that allows to list attachments. 🙂
You are awesome, Oliver!
But it still doesn’t work here..
I upgraded both your plugin and WordPress to latest versions, but nothing 🙁
My shortcodes:
[SimpleYearlyArchive include="90" posttype="attachment"] <– shortcode with the attachment category ID, still returns me that no post was found.
—
[SimpleYearlyArchive posttype="attachment"] <– without the ID, returns a list of many empty lines..
Hi Luiz,
1. I think this is intentional. As attachments dont belong to categories directly, you cannot filter attachments by category.
2. Did you add titles for your attachments/media items?
Hallo Oliver Schlöbe,
seit dem letzten Update auf Version 1.8.1 funktioniert dieses Plugin nicht mehr.
Siehe meine Seite: Kath-Kirche-Garbsen.de, dort in der horizontalen oberen Auswahlleiste Archiv.
Fehlermeldung bei Windows Edge: http-Fehler 500. Auch bei anderen Browsern funzt es nicht.
Viele Grüße
Bernhard
Hallo Bernhard,
kannst Du bitte folgenden Schritt befolgen: https://die-netzialisten.de/wordpress/php-fehler-finden-mit-der-wordpress-debug-funktion/ , dann deine Archivseite noch einmal aufrufen und die fehlermeldung kopieren?
Vielen Dank!
Hi Oliver,
I’m using your plugin showing two custom post, but now I would need to show in the archive only the post of two specific custom taxonomies in my custom post. I did try to use the exclude or include parameters, but they seems to work only for the taxonomy category. I’m I right? is there a way to make the plugin work even with the custom taxonomies?
in the code the fix should be here:
https://plugins.trac.wordpress.org/browser/simple-yearly-archive/trunk/simple-yearly-archive.php#L124
or here
https://plugins.trac.wordpress.org/browser/simple-yearly-archive/trunk/simple-yearly-archive.php#L162
I dind’t see other part but I could have missed them
I did try to change the first part of the code with
$allcatids = get_terms( array(
‘taxonomy’ => array(‘custom_tax_1′,’custom_tax2’),
‘fields’ => ‘ids’,
) );
and the second part with:
($syaargs_includecats != ” ? $syaargs[‘custom_tax_1′,’custom_tax2’] = $syaargs_includecats : ”);
But it didn’t work…the list it’s always empty. Could you please help me
Thank you
Hi Kief,
currently it’s only possible to show posts by custom post types like
and by including and excluding category IDs. Taxonomies are on my TODO, but I can’t tell an ETA at this time.
Hi Oliver,
sorry to bother you again, do you have any news about the possibility to include and exclude taxonomies?
thanks
Hi Kief,
you’re not bothering at all. 🙂 I’ve already started to implement the changes but I’d like to implement it a little more flexible than “just” allowing to exclude taxonomies but also allowing anyone to filter by any field more specifically. That’s why it’s taking quite a bit, plus I’m busy with my job, but I’m on it. Sorry I can’t tell an ETA still.
Hi Kief,
I just released version 2.0.0 that allows to query for literally anything. For your specific needs try to add the following snippet to your theme’s functions.php:
Let me know if there’s any issues. 🙂
Hi Oliver,
I did try but probably I missed something. This is what I try to achive:
I’ve 2 custom post type: eventi and mostre, and for each I’ve created a custom taxonomy, respectively “tipo-evento” in “eventi” and “tipo-mostra” in “mostre”. Inside “tipo-evento” there are 3 taxonomies: “archivio”, “corso”, “prep” and something similar in the tax “tipo-mostra”.
I need that the archive calls only the posts in the “archivio” for both eventi and mostre.
This is what I tried:
– I updated your plugin;
– I added the snippet in the function.php, changing the “custom_tax_1” in “tipo-evento” and “custum_tax_2 in “tipo-mostra” ;
– I wrote the shortcode in my page [SimpleYearlyArchive include="ID of "archivio" in "tipo-mostra",ID of "archivio" in "tipo-evento"]
When I open the page the result is “No article found”
What I did wrong?
Hi kief, first off, try to just use the shortcode
as everything else will be handled by the snippet I posted earlier. If that doesn’t help, we’ll dig deeper. 🙂
Hi Oliver,
I tried as you suggested but the result is still “No article found” 🙁
Hi kief,
may you please paste the contents of your functions.php file here: http://pastebin.com/
I just need a better impression of your taxonomy structure so I can rebuild it in my test blog. 🙂
Hi Oliver,
Do you maybe have a suggestion how to create a “simple-monthly-archive” instead of a yearly archive? Could I somehow change any settings in your plugin or are you aware of another approach?
Thank you in advance.
Hi FOB, the plugin name “Simple Yearly Archive” stands for what the plugin does, so there’s no way to make the plugin output a monthly archive. 🙂
There are, however, other plugins available that may fit your needs, e.g. https://wordpress.org/plugins/anual-archive/
Hi Oliver,
Thank you very much for your prompt response!
I looked at the plugin you suggested. I am afraid it does not do what I am looking for. I would like to get a display of all published posts seperated by their month of publication with the month date in a header on one page. Are you maybe aware of any other options to achieve that?
Thank you once again.
Hi FOB, maybe this one? https://wordpress.org/plugins/smarter-archives/screenshots/
Not exactly what you had in mind, but as close as it gets. 🙂
Hi Oliver,
Any chance to show the tags next to the post?
Currently I only see the option “Show categories after each post?” in the Settings.
Thanks.
Hi Dorin, sounds like a good idea. Will be looking into it. 🙂
Hi Dorin, displaying tags is included in version 1.9 now. 🙂
Hello Oliver,
Thanks for your excellent plugin. It does exactly what I want, but I’m having a problem setting it up. I’m new to WordPress design and am developing my first site in a localhost Xampp environment. I wonder if the localhost environment is causing my problem:
I use this shortcode to avoid displaying current-year 2017 posts:
[SimpleYearlyArchive type="yearly_past"]
SETTINGS
Linked years: YES
Collapsible years: (no)
Show post count for each year: YES
Show categories after each post: YES
Show tags after each post: YES
My Archive page displays as appears in this screen capture image:
http://bothbarrels.net/oliver/archive-1.jpg
Posts are listed below each year, but I don’t want the posts to be visible until the visitor selects an individual year link. I realize I should select “Collapsible years†but that is not working for me. Read on…
I want my Archive page to display as yours does in your Archives demo at this URL:
https://www.schloebe.de/archiv/#year2012
In your example, each year is an active link with the number of posts in parenthesis at the right. Selecting the year link displays the individual post links below that year as a heading.
If I adjust my SETTINGS as shown below, the data displays incorrectly as appears in this screen capture image:
http://bothbarrels.net/oliver/archive-2.jpg
And the year links do nothing when selected; no posts are displayed and nothing changes.
SETTINGS
Linked years: (no)
Collapsible years: YES
Show post count for each year: YES
Show categories after each post: YES
Show tags after each post: YES
Please advise as to how I can format the data the way you did on your Archives demo.
Danke,
Tom
Hi Tom,
your comment was pending moderation as it included several external links so you couldnt get to see it after submission but it didn’t get deleted – obviously. All good. 🙂
As for your issue: The reason it displays as shown in http://bothbarrels.net/oliver/archive-2.jpg might be CSS related. You may have set headlines like h1, h2, h3… etc to
display: inline
. Can you confirm?2 more questions to get started:
1. What’s your setting for “Before / After (Year headline)”?
2. Do you happen to have an ad blocker running that may block some scripts?
If you prefer to continue writing via email, my email is scripts (at) schloebe (dot) de
I’m sure we’ll get this one solved. 😉
Thank you, Oliver.
I will try sending email to you directly, due to my localhost limitations and the need for screenshots at external links.
Tom
Hi Oliver,
Here is the function.php
http://pastebin.com/ixKZYdzQ
thank you again for your attention on my problem
Hi kief,
I think I managed to make up a solution. 🙂
1.) Use the following shortcode:
2.) Replace the existing snippet in your functions.php file with the following snippet:
Let me know if this is working as intended. 🙂
this worked perfectly!
many thanks for your help
Hi there
I love this plugin but I’m struggling to do what I want to. I need to show one list with only the active years posts and another list with all the archives in. the trouble for me is i don’t know if my code is working because i’ve only got two blogs, as yet. can you please help and let me know which specific code to use to do these two things please?
regards
denise x
Hi Denise,
you should be good to go with
to display posts from the current year and
to display posts from past years. Let me know if this helped. 🙂
Perfect
Thank you so much x
Just another query. I have a lot of blogs for each year. Is there a way to show them by month, so there is only every 12 links for each year and then the user can select the month and it opens out a link to show the blogs names and links to them?
regards
Denise x
ps i’m really loving this plugin and will use it on so many of my sites …
Hi Denise,
as the plugin name implies it will only generate a yearly list of your posts, sorry. 🙂
Hello again
I thought as much. Thanks x
Hi, I noticed that you print out the module name and version as a HTML comment. This is a potential security issue, as it discloses some sensitive information from my point of view. How can I disable this behaviour? Thanks, Florian
Hi Florian, good catch! Printing the version info was actually due to support reasons for quickly getting the plugin version info but I’ll be issuing a plugin update later today that’ll remove that HTML comment. Thanks!
Hi Oliver.
I want to customize font-size, font-color, line-height, margin etc. of the heading of the year. How do I do it? Please give me some suggestions. Thank you for such a great plugin.
Hi Dang, you can do it with plain CSS. Just add the following to your theme’s style.css:
.sya_container h3 {
font-size:
font-color:
line-height:
...
}
Change h3 to what you chose for “Before / After (Year headline)” in the plugin’s settings.
Would it be possible to add customization to the setting section of the plugin? I’m not quite familiar with CSS so…
Well, CSS is a quite powerful tool and adding each possibility of CSS as an option to the settings page would make the settings page huuuuge. 🙂
What are you trying to achieve?
I want to be able to replicate to some extent this archive page just like on James Clear website (http://jamesclear.com/articles). I want to customize the heading (year) for ease of reading to my readers. Your plugin provides me with almost what I want. I just only need some more customization :).
I, too, would like to customize some of the content settings. Mainly just font size. I added the above CSS code to my theme and it did not work.
I added the following:
.sya_container h3 {
font-size: 16px;
}
Hi Alpesh, depends on your configuration. May you please provide a link to your archive page? Thank you!
It is the first time that i’m using this plugin and i’m struggling to display yearly archive from a specific category with no luck.
if (function_exists(‘simpleYearlyArchive’)) {
simpleYearlyArchive(‘yearly’,’215′);
}
where 215 is the category id. Unfortunately the plugin displaying posts from another category.
Could you help on this?
Thank you!
Hi audemedia,
try
if (function_exists('simpleYearlyArchive')) {
simpleYearlyArchive('yearly','','215');
}
The years are appearing in duplicate:
2017
2016
2015
2017
2016
2015.
Please advise.
Hi John, working fine on my installation: https://www.schloebe.de/archiv/
May you please provide an example link? Do you happen to have inserted the shortcode twice in the content editor?
I changed the theme of the page to an archive page to override the problem.
Nice you got it working.
I am on the most current version of WordPress and I created a page with the following wording:
Take a look at all the articles I have published so far.[SimpleYearlyArchive]
When I preview my page I see a list of all the posts I have created but when I publish my page I see:
“Nothing Found
It seems we can’t find what you’re looking for. Perhaps searching can help.”
What am I doing incorrectly?
Hi Charles, the wording of
sounds like the 404 page of your template and the page you were publishing could not be found.
Have you checked that Speaking URLs are enabled for your installation?
Hi, How would I go about having the content in my archive page displayed by Month and then under each month, the specific titles of the articles that we published under each month?
Many thanks Oliver!!
Additionally, is there a way of archiving the content into categories in the Archive page? For example, we’d like to archive our category into four sections. 1. Interviews, 2. Weekly news updates 3. Research Posts 4. All others/assorted
Hi!
Thank you for this great plugin!
How do I list child categories only after title? Can’t figure out that myself :/
Thank You!
Usually they do, but depends on the used theme. May you please provide a link to your archive page? 🙂
Hi, this is my temporary site:
http://www.rknf-temp.fi/kuvat/
Child categories are listed but I want to list ONLY child categories without their parents.
For example year 2017 has entry “14.10.2017 – LapUA Ralli (F-Cup, Ralli)”. I want it to show only “14.10.2017 – LapUA Ralli (F-Cup)”.
“F-Cup” is a child category of “Ralli.”.
Hi, alright, now I got it. Well, it wasn’t possible before but I just released a new plugin version 2.1.0 which I ask you to update to.
After you’ve updated to version 2.1.0 please add the following code to (the end of) your theme’s
functions.php
file:function sya_child_categories( $sya_categories ) {
return array_filter($sya_categories, function($v, $k) {
return get_category( $k )->parent > 0;
}, ARRAY_FILTER_USE_BOTH);
}
add_filter( 'sya_categories', 'sya_child_categories', 10, 3 );
Please let me know if that solves your request. 🙂
Excellent! Just the way I wanted!
Thank you so much!
Hi, How would I go about having the content in my archive page displayed by Month and then under each month, the specific titles of the articles that we published under each month?
The way our current archive is can be viewed here: https://thelithiumspot.com/archive/
Many thanks Oliver!!
Hi, as the name of the plugin “Simple Yearly Archive” implies, it will only list your archives by year, not by month. 🙂
You may try other plugins like https://wordpress.org/plugins/compact-archives/
Collapsible years? dont work for me.
After click on year nothing shows 🙁
Hi Mathew,
in the plugin’s settings page, may you please set the following values for the “Before / After (Year headline)” option:
First input field insert
<h3>
and for the second</h3>
Let’s see if that’s helping. 🙂
I think the best option is do that:
• 2017
• September
• October
and after click on name of the month is collapse(you will see) list of all posts from this month
i searching for that plugin and nobody did it, i think so… or i cant find it.
hi, the plugin was working fine for a while but recently I get this error message when I click on the link to my archive
Fatal error: Unknown: Cannot use output buffering in output buffering display handlers in Unknown on line 0
Hi Aaron, this doesn’t seem plugin-specific. Do you happen to use the Autoptimize WordPress plugin?
it started working again after i disabled auto-optimize wordpress plugin. thanks
Hi Oliver
Thank you for this great plugin!
I have a question: how can i adjust the list so that the columns are nicely aligned?
2010 (12)
17 / 04 Post 1
22 / 05 Post 2
24 / 05 Post 3
04 / 06 Post 4
…
The problem is that with some fonts (Armata) the result will be like this:
2010 (12)
17 / 04 Post 1
22 / 05 Post 2
24 / 05 Post 3
04 / 06 Post 4
…
So, it would be great when I can adjust all the “Posts” in a row.
Have you an idea?
Hi memo22,
adding the following CSS to your theme’s style.css file should do the trick:
Adjust the value of 50px depending on your theme.
Thank you Oliver!
Hi Oliver,
Love the plugin, but can’t seem to make it work with my theme (no formatting). Would you mind helping me out? I’d like the years to display in h3, not in p.
Thanks!
Hi Thijs,
if I understand you correctly, the following settings on the Simple Yearly Archive options page are the ones you’re looking for: http://screens.schloebe.de/image_2018-03-14_19_52_25_001.png Just typing
<h3>
in the first input field and</h3>
in the second should do the trick.Hi there
Great plugin!
How do I get to display my archive like your demo.
The short codes are displaying the articles as well and I just want to show the year and article count like below
2017 (67)
2016 (19)
2015 (12)
Hi David, please see my reply via email.
What is the answer to this question?
Hi, these are the plugin settings I’m using: https://screens.schloebe.de/image_2021-10-16_001.jpg
Hi, please may i have the answer to this question.
Thanks
Hi, these are the plugin settings I’m using: https://screens.schloebe.de/image_2021-10-16_001.jpg