Wordpress Plugin : Multipage Toolkit
Yes, I have finally done it. I have added writing a wordpress plugin to my repertoire of skills. This is the first time I have ever released code for other people to use , so please be gentle.
This plugin has been written to overcome something that is a personal bugbear about Wordpress for me and that is its multiple page posts. The built-in function that provides pagination for posts is very limited and just does not give you the flexibility to find the perfect navigation system for your blog.
Wordpress as standard has the ability to paginate your posts, i.e. split very long posts over separate pages. You do this by using the <!–nextpage–> tag to create page breaks, the real shortfall of the built-in function is there is no way of adding titles or headings to these pages - something like index or content list, so readers can jump straight to specific areas - this is commonly seen on hardware review sites.
I wrote this plugin to try and improve this area and open up even more possibilities with Wordpress.
My plugin provides 3 functions.
- Add titles or headings to each page (using <!–pagetitle:–>)
- Display number of pages on index pages (TA_display_pages)
- Quick jump and title navigation options (TA_content_jump)
Very easy to use and very simple to integrate in to any theme.
Installation
- Download file (here)
- Unzip and place directory in to your “plugins” folder (/wp-content/plugins/)
- Activate plug-in through the admin panel
Change Log
Version 1.2 (20th March 2008)
Added a check for trailing slashs and permalink structure for paging
Cleaned up readme.txt for better formatting
Checked compatibility with Wordpress 2.5
Version 1.1 - Add new quickjump method - list menu / content table
Version 1.0 - Initial version
Donations
Please consider donating if you have found this plugin useful, it helps pay for my hosting!!
How to use
Function TA_display_pages
This function allows you to simply display page information for your posts on the post listing pages (such as index, categories and tag pages). It can also be used to display the page number of the current page.
Insert the following code into your theme files in the location you want the page information to appear:
<?php if(function_exists(’TA_display_pages’)) { TA_display_pages(); } ?>
In my case I added the code in to my index.php , category.php and tag.php files. Next to the post title code. Here is the code as used in my index.php file:
<h2><a href=”<?php the_permalink() ?>” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>”><?php the_title(); ?></a><?php if(function_exists(’TA_display_pages’)) { TA_display_pages(’ <small>(’,’ pages)</small>’,”,’total’); } ?></h2>
Options
TA_display_pages($firsttext, $lasttext, $midtext, $display_type)
-
$firsttext = ‘ Page ‘
-
$lasttext = ‘ ‘
-
$midtext = ‘ of ‘ (only used when display_type is all)
-
$display_type = ‘all’ (total , current, all)
Examples
Default settings Page 1 of 3TA_display_pages(’(',’ pages)’,”,’total’) (3 pages)
TA_display_pages(’(you are on page ‘,’ now)’,”,’current’) (you are on page 1 now)
Go on to the next page to read about the other functions.
- Related Posts

