Doing Things Wrong

Pressing Words

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:


Fender Jazzmaster Bass 1
Fender Jazzmaster Bass 2
Fender Jazzmaster Bass 3
Fender Stratocaster Bass 1
Fender Stratocaster Fretless Bass
Fender Stratocaster Bass VI
Fender Stratocaster Bass IV
Fender Stratocaster Bass 2
Fender Stratocaster Micro Bass 1
Fender Stratocaster Micro Bass 2
Fender Stratocaster 12-string Guitar
Fender Stratocaster Uke Bass
Fender Telecaster Bass
SX Precision Bass

As everyone should know, the Stratocaster guitar is actually the guitar version of the Precision Bass, which came first. The big innovation on both was the extended upper horn, a necessity on a long-necked bass for balance and to bring the low frets within reach when the instrument is hanging on a strap. Not strictly needed on a guitar, but looks great, and back in the 1950s nothing had ever been seen like it. It was an instant hit.

Printed from luthierylabs.com