buritica
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Error 404 on pagination when changing posts_per_page on query_postsoh.. and paste this in your functions file
<?php
/*
Plugin Name: Category pagination fix
Plugin URI: http://www.htmlremix.com/projects/category-pagination-wordpress-plugin
Description: Fixes 404 page error in pagination of category page while using custom permalink
Version: 2.0
Author: Remiz Rahnas
Author URI: http://www.htmlremix.comCopyright 2009 Creative common (email: mail@htmlremix.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 3 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.You are allowed to use, change and redistibute without any legal issues. I am not responsible for any damage caused by this program. Use at your own risk
Tested with WordPress 2.7, 2.8.4 only. Works with wp-pagenavi
*//**
* This plugin will fix the problem where next/previous of page number buttons are broken on list
* of posts in a category when the custom permalink string is:
* /%category%/%postname%/
* The problem is that with a url like this:
* /categoryname/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’ && isset($query_string[‘page’])) {
unset($query_string[‘name’]);
// ‘page’ in the query_string looks like ‘/2’, so i’m spliting it out
list($delim, $page_index) = split(‘/’, $query_string[‘page’]);
$query_string[‘paged’] = $page_index;
}
return $query_string;
}
// I will kill you if you remove this. I died two days for this line
add_filter(‘request’, ‘remove_page_from_query_string’);?>
Forum: Fixing WordPress
In reply to: Error 404 on pagination when changing posts_per_page on query_posts1) Login as the admin in WordPress.
2)Go to the Settings tab.
3)Go to the Reading tab.
4)Change the Blog pages show at most from the default 10 to any number *less than 10. For example, 5.
5)Save the changes.
View the blog.
Found this here and edited the number to less than 10, hope it helps you out. It fixed mine.