Multipage Toolkit screwing up WordPress Permalinks FIXED!


The Multipage Toolkit plugin is invaluable for many bloggers and webmasters, as it visually allows for page separations and page headers within the WordPress WYSIWYG editor.

Unfortunately since WordPress 3.1, this great plugin screws up permalinks, if you have them set to use anything other than the default.

Fortunately there is a fix for this, so you can have this great plugin installed AND keep your permalink structure and menus intact.

All you have to do is comment out one line of code in the plugin.  You can do this at the filesystem level, or if you have the right permissions you can edit it directly within WordPress.  Just go to Plugins, and then Edit.  Select Multipage Toolkit from the list, and look for this function:

function allpage_permalink() {
     global $wp_rewrite;
     $wp_rewrite->add_endpoint("all", EP_ALL);

Just comment out the $wp_rewrite->flush_rules(); line and you'll be good.

Now you have to flush your permalinks and rebuilt them.  Do this by going to Settings –> Permalinks.  Select the default structure and save.  When the screen refreshes, go back to your custom permalink structure and click Save.

Alan is a web architect, stand-up comedian, and your friendly neighborhood Grammar Nazi. You can stalk him on the Interwebs via Google+, Facebook and follow his ass on Twitter @ocmodshop.