HTML Remix - Dont copy code, remix it!

April 25, 2009

Category pagination fix – WordPress plugin

Update (07 December 2011) : An update has been made to the plugin and is available for download from WordPress plugins directory. This will fix pagination on custom post types as well.


Plugin name : Category pagination fix
Release date : 2009-04-25

Description

Fixes the bug in WordPress 2.7 ( may be in lower version also) in category listing page pagination. When you are using permalink structure as %category%/%postname% , second page URL of category listing page will be category-name/page/2 which WordPress identify “page” as post name. And will return 404 error page. This plug-in will fix the issue. This also fix the next and previous buttons bug in while using custom permalink structure.

I’m using this plug-in for this blog itself :)

Installation

1 . Unzip into your /wp-content/plugins/ directory.

2 . Activate the plugin through the ‘Plugins’ menu in WordPress

Known issues

No issues reported yet. Please report issues in comments

Download

Category pagination fix 1.o


Incoming search terms:

wordpress category pagination, pagination category wordpress


75 Responses to “Category pagination fix – WordPress plugin”

  1. Manel says:

    Hi, i have the same problem that lot of people.
    My page is with permalinks %post_name%.
    When i going to http://www.manelroig.com/wordpress_AGG/portfolio/ all it’s ok, but when i going to http://www.manelroig.com/wordpress_AGG/portfolio/page/2 there’re the 404 error.
    Whith this pluggin i don’t resolve the problem.
    My template is Pitheas Theme.

    Any idea?

    Thanks in advance.

    pd: Flash never die.

  2. Diego R. says:

    Hi to all.
    I solved the problem of tags..
    In cpt-category-pagefix.php after the first if.. add this

    elseif(isset($qs['tag']) && isset($qs['paged'])){
    $qs['post_type'] = get_post_types($args = array(
    ‘public’ => true,
    ‘_builtin’ => false
    ));
    array_push($qs['post_type'],’post’);
    }

    In this way this plugin (very usefull) works also for tags.

  3. My programmer is trying to convince me to move to .net from PHP.
    I have always disliked the idea because of the costs.

    But he’s tryiong none the less. I’ve been using Movable-type on a number of
    websites for about a year and am nervous about switching to another platform.
    I have heard fantastic things about blogengine.net. Is there a way I
    can import all my wordpress content into it? Any help would be really appreciated!

    • Remiz says:

      Moving to .net from a world of php is really a bad idea I would say.
      It’s not just the cost that matters, but security, community support, resource availability all that adds up and server cost and performance is another factor you should be looking at. Specially when you have a lot of sites.

      http://wp2be.codeplex.com/ could help you transfer WordPress to blogengine.

  4. McArt says:

    Didn’t work.

  5. saeed says:

    thanks it’s work well :)

  6. blogger says:

    I installed the plugin too, but still getting 404 nothing found in category pagination…. at http://www.nucleusmarket.com/WORLDMARKET/home-garden/animal-care/page/2/, please look me!

  7. Runka Samanta says:

    I installed the plugin, but still getting 404 nothing found in category pagination…. at http://dev.wrctechnologies.com/talent/category/performers/page/2/

  8. gobanq says:

    what if I make a costum page template, and take up the post of the category? This plugin does not work . check http://grahapencerahjiwa.com/cd-pencerahan/

  9. ishrat says:

    pluggin is not showing anywhere in admin panel plz help

  10. judy s says:

    also installed the plugin and it didn’t help.
    wordpress 3.3.2
    multi-language WPML 2.0.4
    custom permalink: /archives/%post_id%

    pagination test:
    http://www.ncsforum.org.il/archives/category/%D7%9E%D7%94%D7%AA%D7%A7%D7%A9%D7%95%D7%A8%D7%AA

    please let me know what can be done.
    thanks in advance!

  11. Daniel says:

    Did. The. Job. Many Thanks.

  12. Shah Hussain says:

    WOW!!! this work really!!!! I spent upto 20+ hours on fixing the issue, but when I install this plugin now everything is working perfect!!!!!!!

    THANKS!!!!!!!!!

  13. Rachel says:

    AMAZING!!!! I have been struggling with this problem for a month now, even the maker of the template I was using couldn’t help me. I tried just about every solution I could find to no avail.

    Your code fixed it.
    THANK YOU, THANK YOU!

  14. Daniele says:

    Please take a look at my thoughts about this topic here:

    http://wordpress.org/support/topic/explanation-and-workaround-for-error-404-on-category-pagination?replies=10

    It seems, for now, the only 100% working method out there.

  15. Kino says:

    Unfortunately, did not help. Have tried everything possible, but nothing works. I have a structure as /% post_id% / and WordPress 3.3.1.

    I used a different code, but nothing helped. For example, the code is:

    And will return 404 error page:
    http://www…..com/category/films/page/2/

    Please help.

  16. Deryck says:

    Hi, I have the same issue but whit tags. Works perfect with categories but not with tags.

    ¿Any suggestion please?

Leave a Reply


one × 4 =

Subscribe via email

I’m promoting

Yellow Pages
Advertise here