<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Kevin Bradwick &#187; pagination</title>
	<atom:link href="http://www.kevinbradwick.co.uk/tag/pagination/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kevinbradwick.co.uk</link>
	<description>Web development and design blog</description>
	<lastBuildDate>Fri, 09 Jul 2010 08:11:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Fixing the pagination error using custom permalink structure in WordPress</title>
		<link>http://www.kevinbradwick.co.uk/2010/01/fixing-the-pagination-error-using-custom-permalink-structure-in-wordpress/</link>
		<comments>http://www.kevinbradwick.co.uk/2010/01/fixing-the-pagination-error-using-custom-permalink-structure-in-wordpress/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 18:11:33 +0000</pubDate>
		<dc:creator>kevin</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[pagination]]></category>

		<guid isPermaLink="false">http://www.kevinbradwick.co.uk/?p=50</guid>
		<description><![CDATA[For a while this has been really annoying me. Whenever I use the permalink structure /%category%/%postname%/ I get 404 errors when using the next_posts_link() and previous_posts_link(). I a fix for this here. You can use this code in a themes functions.php file or use it as a plugin. /* Plugin Name: Fix Paging in Category [...]]]></description>
			<content:encoded><![CDATA[<p>For a while this has been really annoying me. Whenever I use the permalink structure /%category%/%postname%/ I get 404 errors when using the next_posts_link() and previous_posts_link(). I a fix for this <a href="http://barefootdevelopment.blogspot.com/2007/11/fix-for-wordpress-paging-problem.html">here</a>. You can use this code in a themes functions.php file or use it as a plugin.</p>
<pre name="code" class="php">/*
Plugin Name: Fix Paging in Category Listings
Plugin URI: http://www.thinkbarefoot.com
Description: Fixes a bug where next/previous links are broken in category by year/month listings
Version: 0.5
Author: Doug Smith
Author URI: http://www.thinkbarefoot.com

Copyright 2007  Doug Smith  (email: dsmith@thinkbarefoot.com)

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

*/

/**
 * Function to fix problem where next/previous buttons are broken on list
 * of posts in a category when the custom permalink string is:
 * /%category%/%year%/%monthnum%/%postname%/
 * The problem is that with a url like this:
 *
 * /category/2007/10/page/2
 *
 * the 'page' looks like a post name, not the keyword "page"
 */
function remove_page_from_query_string($query_string)
{
    if ($query_string['name'] == 'page' &amp;&amp; isset($query_string['page'])) {
        unset($query_string['name']);
        // 'page' in the query_string looks like '/2', so split it out
        list($delim, $page_index) = split('/', $query_string['page']);
        $query_string['paged'] = $page_index;
    }
    return $query_string;
}

add_filter('request', 'remove_page_from_query_string');</pre>
<p>Happy days.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevinbradwick.co.uk/2010/01/fixing-the-pagination-error-using-custom-permalink-structure-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
