How to Edit your Single Post Navigation on WordPress

The WordPress Codex presents that the default code and presentation of the post navigation links appears as:

Perhaps I’m a little too OCD twitchy about this, but I take issue with the navigation structuring. When I’m looking at the front page of my blog, displaying the ten most recent posts, and scroll to the bottom, it presents “Next Page ».” To my mind, though, I would not be navigating to the “next page,” but rather to the “previous page” because I would be looking at older entries. Older is always Previous to me, but WordPress is backwards in this regard.

Conversely, when accessing a single post in my primary WordPress theme (and perhaps others), it was backwards from what I now expected based on the front page of my blog. To access older articles, I would click the link on the left (denoted by the name of the entry, rather than “newer” or “older”), and newer articles were accessed by using the link on the right (which, to my mind, should be leading me into an archive). This seemed counter-intuitive considering that the full-page-post (where I have ten entries on a page, rather than just the single one) navigation had older entries on the right and newer on the left.

In essence, the navigation seemed contradictory and inconsistent. To change this, I needed to edit browse.php (though in most themes, this is located in index.php) and reverse the following conditions:


The aquo statement is for two left or right karat marks, and the L or R that preceeds the aquo tells them which direction to point. Therefore, when I reversed these, it became:


Note the spacing, which is purely for aesthetic reasons. I added the pipe (the | symbol) myself for the same reasons.

If you want your post navigation to conform to whatever OCD tendencies you might have, this code should be located in either index.php or browse.php.

What’s sort of amusing is that my stories blog, despite having older posts on the left and newer on the right (the same configuration that set off this OCD codefest to begin with) doesn’t bother me at all. Maybe that’s because it doesn’t have a sidebar and everything is centered (and the theme is built to only display one post at a time), so I wasn’t expecting older posts to be on the right or the left. And I get the initial logic: much like an English book, you turn the page from right to left, so newer content (that you haven’t read yet) is to the right… but it has to be consistent. All of your navigation links must agree, and by default on my primary theme, they did not.

Does anyone else think about visual triggers and the expectations to which they lead?

5 thoughts on “How to Edit your Single Post Navigation on WordPress

  1. It would be great if you’d stop casually using the term “OCD” to describe behaviours that have nothing to do with Obsessive-Compulsive Disorder. It’s very offensive to people who actually suffer from this awful disease, to see the term OCD applied to such petty things as wanting to change the aesthetics of a web page (which is perfectly normal thing to want to implement, and has nothing to do with either obsessive or compulsive behaviour).

    Your use of the word “twitchy” makes me think that not only do you not have OCD, you’ve never even met anyone with OCD. If the navigation design of web pages makes you twitchy, perhaps you should go see a neurologist.


  2. I apologize for offending you, I suppose, but you might also relax a bit concerning the use of terms in a colloquial manner rather than scientifically.

    And for what it’s worth, I have known people who suffered from OCD, as well as germophobia, and dated a girl once who had OCD. That doesn’t make using the term inappropriate when attempting to describe an obsessive rash of perfectionism and the perhaps irrational need to tweak and fiddle until everything is perfect (which it never is).

    Thanks for stopping by, and if you’d like to chat further about this, just drop me a line. But as a general rule, I think political correctness is overrated and we should start paying more attention to what we’re saying rather than how. When we let the “how” get in the way of the “what,” nothing gets said at all.


  3. Exactly what I was looking for, since my template or wordpress shows my forward backwards in some tottaly oppositive ways, hopefully after implementing this my blog can start work the way it should. It have troubled me for months, but finally I think you gave me a usefull solution 🙂 Regards


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.