WordPress Chronological Order …

May 10th, 2006 by Kat Kingsley-Hughes

Today I’ve lost the plot at least a couple of times…

I’ve been trying today to sort out Adrian’s Drac Ant page over on Antrageous Antics. The page is a WordPress category page (with a little bit of extra formatting that will show only on the Drac Ant category archive).  Simple enough, but what bakes my brain is trying to figure out how to put in meaningful navigation through the pages of Drac Ant cartoons, especially because in this case they correspond to journal entries and dates in the original Bram Stoker book, Dracula. 

Adrian wants a way for the user to quickly get to the earliest entry that was made because, being a daily cartoon site, the site is set to show one cartoon post per day and that means the archives will only show one post per page too (unless of course you know of some way round this, if you do please let me know!)  So getting back to the original entry would take a lot of clicks otherwise.  Luckily the WP-PageNavi plugin puts in a link to the Last page by default if there are more than 3 pages.  But wait a minute shouldn’t that ‘Last’ really be ‘First’?  After all that page contains posts that were posted earlier in time than those on the ‘First’ page, right?

I’ve used WP-PageNavi many times before but it’s never really hit me before today that when it shows [1] [2] [3] » Last  that the ‘Last’ page it’s linking to is really the first chronologically speaking. It’s not just this plugin that does it or WordPress – lots of software does it. Just a chronological semantic glitch … perhaps because so many people, myself included, are still adjusting to websites that handle the page navigation in reverse chronological order. Before the advent of the blog and blogging software this was pretty hard to do manually!(As an aside we were discussing recently the main differences between a blog and a website and I’d have to say that content being arranged chronologically is probably the biggest difference after trackbacks.)

So I edited the plugin (email.php) to swap around  the words First and Last in the code. 

But then it occurred to me that there was something wrong with the WP-PageNavi set as it was in amongst the previous and next entries blocks.
I had to look at it for a little bit before I realized what it was. The little double arrow » on the pagenavi is pointing in the direction of the older posts. But there’s also a » on the Next Cartoon link which is pointing to the more recent posts – it should be the other direction! That’s it, brain 100% fried. How come I never noticed this before? (Am I having an ‘off’ day today or a more switched on than usual day???)

So I switched around the the « and » arrows in the template so they pointed the right way:

<div class="alignleft">
<?php previous_posts_link('Next Cartoon &laquo;    |     ') ?>
<?php wp_pagenavi()?>
<div class="alignright">
<?php next_posts_link('|     &raquo; Previous Cartoon') ?>

Ugh! Is that right now? Or should this site not be called ‘Vexentricity’ (i.e. vexation + eccentricity) but rather ‘The Beginnings of Dementia’ … ?


This entry was posted on Wednesday, May 10th, 2006 at 9:30 pm and is filed under Wordpress. Both comments and pings are currently closed.

Comments are closed.

%d bloggers like this: