WordPress Plugin : Multipage Toolkit

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 2.6 (5th Sept 2008)
Added auto insertion for Pages as well as Posts
Fixed issues with saving settings
Fixed html and code entry in to text boxes

Version 2.5 (10th July 2008)
SVN broke upload – uploading again

Version 2.4
Changed CSS style naming for the all page links

Version 2.3 (internal release)
Added option to have custom page seperators (including javascript for adverts) on single (ALL) page display
Added function call to use options page settings from inside the theme files
Fixed badly coded string matching (Thanks to Andrei for the fix)
Fixed spelling error in button registration process (Thanks to Jonathan for spotting this)
Fixed maintain trailing slash consistency across site

Version 2.2 (internal release)
Added ALL link Display Text Option
Added new CSS class for ALL link styling (contentjumpall , contentlistall)
Fixed bug where pagetitle followed by nextpage caused errors
Fixed tinymce js cache issues (hopefully..)
Fixed navigation for preview draft posts

Version 2.1 (30th May 2008)
Major Update
New Display ALL pages link, view multipage posts on single page
Added Auto Insert Options page, no more code necessary
Visual Editor Integration, buttons to add page breaks and page titles

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 3

TA_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.

    Share
      Facebooktwittergoogle_plusredditpinterestlinkedintumblrmailFacebooktwittergoogle_plusredditpinterestlinkedintumblrmail

126 thoughts on “WordPress Plugin : Multipage Toolkit

  1. Pingback: Wordpresshosting » Blog Archive » Posting über mehrere Seiten verteilen

  2. Pingback: Marshal’s Blog» Blog 存档 » 使用wordpress日志分页插件

  3. Tarkan Post author

    Hi Lia,

    Your theme maybe using the builtin WP function to display page links. You need to remove the function call from your theme.

    In the multipage toolkit settings page to achieve what you want set the quick jump to drop down menu and then set the next/previous links to page titles.

    Remember to select where you want it inserted – top or bottom of the page.

  4. Lia Suzuki

    Hi,

    I’ve been using your plugin on my other site (http:www.liasuzuki.com) and really like it.

    I just installed it to my new blog (http://www.toilettraincatblog.com) and would like to use it there, too. I tried the “pagetitle” button and can’t seem to make it work. (If I understand the plugin correctly, I should have the capability to input the page title, making the customary “1 2 3…” at the bottom “Day 1 Day 2 Day 3…”, right?) I input the title (Day 2), but the usual “1 2 3…” is still showing up.

    Any suggestions?

  5. Tarkan Post author

    Shadey,

    glad you got it working. Yeah, WordPress turns double dashes in to a em-dash (one long dash) which obviously breaks the code thing.

    Have you got the buttons going?

  6. shadey

    Sorry to spam your comments but spent a while due to errors. I was copying code from your text, but the ” would paste with me as a single “, very odd but fixed now 🙂

    Works great for me. Thanks 🙂

  7. shadey

    I managed to get the plugin working nicely. However when I go to the settings page for the plugin, none of the changes ever save/apply. Where can I edit these values manually so that I can force the use of an Ordered List on my page? Thanks.

  8. Tarkan Post author

    Andrea,

    Are you stilling missing the buttons? Try refreshing the browser (shift-f5). You can manually delete the Tinymce cache (/wp-content/uploads/js_cache/tinymce_*).

    The other thing worth mentioning someone else had issues with is to make sure the plugin is installed in its own folder which should be multi-page-toolkit. So the files are installed here /wp-content/plugins/multi-page-toolkit.

  9. Andrea

    Hi,

    I’m very excited to use your plugin! Thanks for putting it together. I’m novice (no php!) so I’m relying on the Tiny MCE buttons. Trouble is, mine haven’t been displaying properly since a recent and painful WP upgrade. Can you help?

  10. Tarkan Post author

    Sounds like you are not creating multi-page posts. The correct tag to use when switched to code view is < ! - -nextpage- - > (no spaces between the characters, wordpress has a bad habit of turning double dashs in to one long dash).

    Better still use the buttons created by my plugin in the visual editor.

  11. Catalin

    Hello there. I appreciate your work, this is very useful plugin. I was looking for someting like this, but now that i have it… i can’t use it. Very frustrating. :-w

    I think it’s not the plugin itself but some problems with next page tag and wordpress, or my theme… (when i use the nextpage tag… i only get one page and the rest is not shown.)

    Please, tell what code to paste and where so i can get this working.

    Many many lots of thanks, 🙂
    Catalin

    P.S.
    I placed this code in the loop (index.php and page.php) : <?php wp_link_pages(‘before=&after=’); ?> and this also

  12. fossil

    Above all, as it stands, it is an already very useful plugin, and thank you much for maintaining it, such the debug for WP 2.6.

    Not sure how far you want to take this, but this has the makings of a whole new genre of plugins for CMS. Case in point, my application is to offer a text book manuscript which involves chapters and subchapters and even Part1, part2 etc. manuscripts, each with a fairly deep chapter hierarchy.

    Thus, You are practically ready to create a table of contents and drop downs within drop-downs.

    Yours is already far beyond ‘just another plugin’. It coulld be a career-maker, if that is something within the scope of what you envision for yourself.

    Thanks a ton for this one, however. I keep hoping —

  13. Pingback: Wordpress Plugin Centre - Wordpress Plugin : Multipage Toolkit Tarkan Akdam s (WP Tutorial) BORED

  14. Tarkan Post author

    I am very sorry. It appears that I missed a bug in this release.

    If you have the All Page seperator set to no seperator in the options page – this causes the settings not to be save.

    Workaround is to set the seperator to custom code. This will allow the settings to be saved.

    I will try to release version 2.6 of the plugin later on today.

  15. Raul

    After upgrade my WordPress to 2.6 distribution, all the page navigation in the blog is gone , and in the plug-in settings I can´t save any setting.

  16. MovieFan

    Hi Tarkan,

    I’ve been looking for precisely this type of WP plug-in. I’ve downloaded it, and plan to install it tonight. Thanks for this plug-in!

Leave a Reply

Your email address will not be published.

Time limit is exhausted. Please reload CAPTCHA.