They say Nero fiddled while Rome burned… Well instead of making any progress on actual content for this site, I’ve been fiddling with WordPress trying to figure out how to bend it to my will. The progress has certainly been hampered by the fact that the last time I wrote any PHP code version 3.0 was all the rage. However, rustiness and my usual A.D.D. aside, I did manage to achieve my objective: I’ve added a page onto the Inkling site that presents all the entries in chronological order. While it is more convenient for a frequent visitor to a blog to read the most recent entry first, it can be confusing to a new visitor who wants to get caught up on all the back posts, hence the Newbie link.
The way I did it was a little quick and dirty, and I am sure that any real programmer worth their salt would be aghast, but at least it didn’t require too many lines of code and kept most of the default template intact. All I really did was exploit The Loop by cramming all the
wp_query objects into an array incremented on each iteration. Next, reverse the array. Then walk back through the array in a
foreach loop, plucking the
wp_query objects back out. It may have been a bit heavy-handed, but then I could use all the WP loop functions just like normal. At some point I may dig deeper into the WP source because I am sure there is a cleaner way (and feel free to chime in if you know one), but this met my needs of the moment.