Forums

WordPress Category Archive
WP Category Archives pagination conflict with wp-pagenavi? (3 posts)

  1. smallwebsolutions
    Member
    Posted 1 year ago #

    I am using the WP Category Archives widget on a site where my client had specific needs for separating out post archives dating back to 2006.

    Unfortunately, I am encountering pagination errors when accessing category/archive links that are called by the plugin.

    Please see the example here:

    http://fortuneinyourcookies.com/blog

    The links in the sidebar for the monthly archives with more than 5 posts (November) and the yearly archives (under the Newspaper Archives drop-down menu) generate pagination links that do not function correctly. It is throwing a double 00 into the permalink structure, i.e.:

    http://fortuneinyourcookies.com/newspaper-column-archives/2006/00

    Then the pagination follows as:

    http://fortuneinyourcookies.com/newspaper-column-archives/2006/00/page/2

    which produces a 404 error.

    Any suggestions would be greatly appreciated. Love the plugin, but can't get it to function correctly.

    Thanks.

  2. smallwebsolutions
    Member
    Posted 1 year ago #

    Found the solution to this issue and am posting the fix here in case anyone else runs into this. The problem was that the permalink rewrite in the WP Category Archives plugin was placing the category before the date, when the category should appear after the date, i.e. http://mysite.com/2010/11/general/page/2.

    For yearly archiving, at line 56 change:

    $year_month_path = $year . "/00";

    to

    $year_month_path = $year . "/";

    For monthly archiving, at line 70 change:

    $url .= $category . "/" . $year_month_path . "/";

    to

    $url .= $year_month_path . "/" . $category . "/";

  3. smallwebsolutions
    Member
    Posted 1 year ago #

    GAH! The monthly fix (line 70) works, but just realized that the yearly fix is returning all items in the category instead of just the items in that particular year. If I figure it out, I'll post the remedy here.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic