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


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 🙂


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


Category pagination fix 1.o

76 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 all it’s ok, but when i going to 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

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

    • Sivasankari says:

      function fix_category_pagination($qs){
      if(isset($qs[‘category_name’]) && isset($qs[‘paged’])){
      $qs[‘post_type’] = get_post_types($args = array(
      ‘public’ => true,
      ‘_builtin’ => false
      elseif(isset($qs[‘tag’]) && isset($qs[‘paged’])){
      $qs[‘post_type’] = get_post_types($args = array(
      ‘public’ => true,
      ‘_builtin’ => false
      return $qs;

      Hello my category pagination issue fixed..For tags i added in category pagination fix itself.but not working..Am i wrong…Please help me

  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 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. 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, please look me!

  7. Runka Samanta says:

    I installed the plugin, but still getting 404 nothing found in category pagination…. at

  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

  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:

    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!!!!!!!


  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.

  14. Daniele says:

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

    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:

    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

Subscribe via email

I’m promoting

Yellow Pages
Advertise here