5. How to Achieve Multi-Paged Post Navigation in WordPress

Alright – it took a day to get this hack working, but I’m glad I figured out what the problem was so I could pass it on to you. The page for this plugin has some issues copying and pasting the appropriate code for some reason (on some pc’s). I copied the code to get this working and got a single instead of double dash, and the quotes were converted to backticks sometimes too. Just follow my queues in this hack and you’ll be fine…

This is something I wish that more people used, and I have to admit that I’m a victim of not doing it myself. I tend to write very, very long descriptive posts. If you printed some of them out they might span 3-6 printed pages or more. I’m breaking a lot of rules all at once here, in addition to losing money at the same time. First, the average person learns in “chunks”. They take in bits of information at once, and too much at once is an overload. I have structured this hack in “10 Steps” because that’s easy to understand and break down by heading. It also makes it easier for users to jump to the one thing or two that interests them if they don’t want or have the time to read all 10. Nevertheless, having all 10 on one big long post page is a but cumbersome. It would be smarter (and more professional) if I could break it down into “10 pages” wouldn’t it? But I still want this to be a post, and I’d hate to have to create 10 separate WordPress pages to get what I want. Oh – and as a bonus if I find a way to do this, I will have 10 different chances to show ads to users (instead of just one), and 10 different post pages to index in the search engines as well. This post sure looks better now that it’s broken down hack by hack!

How do we achieve what we want? It’s of course (yet another) WordPress Plugin called “Multi-Page Toolkit”. This is something I had wanted to do for a loooong time, and this plugin does it well. Something that I purposely neglected to tell you in the last section was that you can separate long posts over multiple pages yourself, the wordpress code to do this is simply:

<!–nextpage–>

Take care to make sure that the code I just gave you has 2 dashes before and after nextpage. When I copied it from the plugin page I only got one dash even though the plugin author (Tarkin) confirms that there were two dashes in the content of his post. Just paste that (in code view) in any post where you want a page break, and you can break up a post into as many pages as you want. The problem with the default WordPress way of doing this is of course the navigation! This plugin fixes all that, because it gives you the abiltiy to add titles or headings to each page, displays the number of pages, and allows users to quickjump wherever they want. Is it more work? Yes. But for longer posts, and the extra money you’ll make by putting many more ads in front of users eyeballs – it’s work it. It also makes your site that much more professional and more like c|Net, hardware review sites, or some of the big boys blogs!

There are a couple different ways to use this plugin. One is to provide better navigation from your index, category, and tag pages (that use the loop for listing your posts). If you go to my homepage and find this post you’ll see that in my “meta” after the post heading it now says “(11 pages)”. If you want to add that to your post listing pages, just add this code…


(’,’ pages)’,”,’total’); } ?>

There are multiple options you can display like ‘page 1 of 3’ or ‘you are on page 1 now’, read the plugin page to get them.

As I said previously – to setup a long post into multiple pages it’s pretty easy. First, just find the places in your post you want to break it into individual pages and place this code tag:

<!–nextpage–>

Next, right after that you want to insert this code tag and give each page a title:





Ok, now save your post. Next in your WordPress dashboard go to your “Presentation->Theme Editor” and edit your Single Page or “single.php” file. You want to put this code (that displays the navigation) “before the loop” so it appears at the top of the page:

that’s the code to diplay the “default options” (as described on the plugin page). You can choose to change any of those options by adding them like this…


You can see on this post I chose to use the “ordered post” or list option (number 3). If you’re not used to writing code, just make sure that any content or text you want to add is in a single quote as in my last code example. Numbers and true or false don’t have to be. I with that this plugin had all these formatting options from the plugin options page in the WordPress dashboard, but for now – it works just as well if you configure the options for yourself! This has to be my favorite hack out of the 10 because it does so much for usability, monetization, and SEO! Click below to go to the next hack…