Collapse all the things!

collapsing archives

When I first created this blog in 2006, I found one thing severely lacking in WordPress – the display of archives. I wanted an expandable and collapsible list of archives like Blogger had in my sidebar, instead of just a dropdown or a big list. Of course, one thing that WordPress has had from a very early point is plugins. I found a plugin called Fancy Archives by Andrew Rader which did pretty much what I wanted. The only problem was that it was a little bit broken. I had started learning PHP back in 2004/2005 though, so I simply started looking at the source code and figured it out. It seemed like the plugin was abandoned, so I created a fork and decided to release it. I have been using collapsing archives, collapsing pages, and collapsing categories on my websites ever since.

Last year I decided to try out the new block theme (full site editing) capabilities in WordPress, and I realized that my plugins would not work with them. I would have to convert them to Gutenberg blocks. I don’t have much time for developing these plugins anymore, but I wanted to give it a try, so I worked on it here and there over several months. In March I committed my changes to the svn trunk branch, and now I finally have decided to call them stable. I am pretty certain that there will be some bugs though, as there are lots of changes. I have tested them both with block themes (this site, running a child theme of twenty-twenty-three), and my family site, which is using a non-block theme based off of twenty-twenty-seventeen.

I have cleaned up the code a bit in the newer version, and gotten rid of jQuery. The only downside to that is the expanding and collapsing no longer is animated. It seems possible to do that now with only css and vanilla javascript, but I haven’t figured it out yet. Maybe in a later version. I hope that people enjoy the new version. I am personally very excited about full-site editing with Gutenberg. There is a learning curve to it, but I think it is possible for more people to learn than PHP and CSS.

Join 165 other subscribers

archives

  • 2024 (10)
  • 2023 (8)
  • 2022 (15)
  • 2021 (19)
  • 2020 (1)
  • 2019 (1)
  • 2018 (2)
  • 2017 (1)
  • 2016 (2)
  • 2015 (5)
  • 2014 (5)
  • 2013 (2)
  • 2011 (7)
  • 2010 (10)
  • 2009 (50)
  • 2008 (28)
  • 2007 (31)
  • 2006 (8)

Category