Doing Things Wrong

Pressing Words

Well, it's that time of year again, time to renew the web hosting. And for those of you that don't know, that has become a lot more expensive than it used to be. Fifty dollars a year is now several hundred. Not to mention the price of domain names has gone up ten-fold.

And I just found out that the nice folks at PayPal disabled all my Support buttons, and I never got a notice (although that may be my fault.) In any case, it is all working again now, so if you would like to make a small donation to help defray these costs, it would be greatly appreciated.

WordPress is primarily a blogger, and its favorite thing in the world to do is spit out your blog posts in descending order by date. But it doesn't want to do that for pages or anything else.

So I hacked the archive template, and made it recognize a 'pseudo-category' called 'recent-pages '. I say it is a pseudo-category because although it is set up like any other category, there is no point in assigning pages to it. Instead, if the WordPress database engine runs across it, it abandons the default query and instead uses one based on descending 'modified_date' for only pages. The final part was getting the pseudo-category to auto-generate. Now, if it is missing or deleted, it magically re-spawns.

Having worked out the details, I could make other pseudo-categories, but I looked over the posts table, and I don't see a need for anything else. My first go at this was very hackish, but I have now done it the right way, and it paginates. In the process, I also gathered up all the pre_get_posts() logic in one place where I can manage it. Before, there was no telling what might happen, it depended a lot on the (unknown) order that WordPress executed the various pieces.

Since I am also using the comments functionality as a Guest Book, I wrote a simple custom output function for that. All a lot of nice improvements to WordPress. I'm giving myself another one of these:


This really puts a dent in the whole tonewood argument.

I doubt there is anything very special about those piezos. My experience is that you need the right mounting and electronics to make a piezo sound good, and it has very little to do with the sensor itself, which is just a little bit of semiconductor.

Printed from luthierylabs.com