Title: [Plugin: WordPress Category Archive] Any patch for WP3.1?
Last modified: August 19, 2016

---

# [Plugin: WordPress Category Archive] Any patch for WP3.1?

 *  [proximity2008](https://wordpress.org/support/users/proximity2008/)
 * (@proximity2008)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-wordpress-category-archive-any-patch-for-wp31/)
 * This is a great plugin, but it’s not with permalinks turned on.
 * Any chance that someone it working in WP3.1?
 * [http://wordpress.org/extend/plugins/wp-category-archive/](http://wordpress.org/extend/plugins/wp-category-archive/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Hugh Mandeville](https://wordpress.org/support/users/hughmandeville/)
 * (@hughmandeville)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-wordpress-category-archive-any-patch-for-wp31/#post-1997527)
 * To get the plugin to work with permalinks in WP3.1, you need to update the redirect_canonical()
   function in wp-includes/canonical.php. On line 167 wrap the following code:
 *     ```
       $tax_url = parse_url($tax_url);
       if ( ! empty($tax_url['query']) ) { // Custom taxonomies may only be accessable via ?taxonomy=..&term=..
           parse_str($tax_url['query'], $query_vars);
           $redirect['query'] = add_query_arg($query_vars, $redirect['query']);
       } else { // Taxonomy is accessable via a "pretty-URL"
           $redirect['path'] = $tax_url['path'];
       }
       ```
   
 * in an if (is_tax()) block:
 *     ```
       if (is_tax()) {
           $tax_url = parse_url($tax_url);
           if ( ! empty($tax_url['query']) ) { // Custom taxonomies may only be accessable via ?taxonomy=..&term=..
               parse_str($tax_url['query'], $query_vars);
               $redirect['query'] = add_query_arg($query_vars, $redirect['query']);
           } else { // Taxonomy is accessable via a "pretty-URL"
               $redirect['path'] = $tax_url['path'];
           }
       }
       ```
   
 *  [Osu](https://wordpress.org/support/users/mrnabo/)
 * (@mrnabo)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-wordpress-category-archive-any-patch-for-wp31/#post-1997577)
 * [@hugh](https://wordpress.org/support/users/hugh/) – I’m not keen on changing
   the core files. Is there any way to modify the plugin code itself to make this
   work? Or an alternative plugins that does work without core hacks?
 * Thanks,
 * osu
 *  Plugin Author [Hugh Mandeville](https://wordpress.org/support/users/hughmandeville/)
 * (@hughmandeville)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-wordpress-category-archive-any-patch-for-wp31/#post-1997578)
 * The plugin just generates a URL with date and category in the query string
 * `/?m=201104&cat=2`
 * with permalinks on, it generates a URL with date and category in file path part
   of the URL
 * `/category-label/2011/04`
 * Since WP3, with permalinks set, the date and category URL doesn’t work with out
   fixing the WP3 code. So I think WordPress needs to fix their redirect_canonical()
   function.
 * If someone can come up with a URL that shows posts for a particular category 
   and date with permalinks set in WP3.1, we can change the plugin to use that URL
   pattern.
 *  Plugin Author [Hugh Mandeville](https://wordpress.org/support/users/hughmandeville/)
 * (@hughmandeville)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-wordpress-category-archive-any-patch-for-wp31/#post-1997579)
 * Just checked, seems to be working correctly in WP 3.1.1.
 *  [john](https://wordpress.org/support/users/nich008gmailcom/)
 * (@nich008gmailcom)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-wordpress-category-archive-any-patch-for-wp31/#post-1997580)
 * I’ve tried it with 3.11- no go.
    Everything looks good, links are built like 
   so:
 * [http://192.168.1.6/?m=201104&cat=4](http://192.168.1.6/?m=201104&cat=4) for 
   March 2011,
 * unfortunately my permalink settings (Day and name [http://192.168.1.6/2011/04/06/sample-post/](http://192.168.1.6/2011/04/06/sample-post/))
 * turn everything into:
    [http://192.168.1.6/category/cat1/](http://192.168.1.6/category/cat1/)
 * (cat1 is the correct category name, I assume it has ID 4)
 *  Plugin Author [Hugh Mandeville](https://wordpress.org/support/users/hughmandeville/)
 * (@hughmandeville)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-wordpress-category-archive-any-patch-for-wp31/#post-1997581)
 * If you are using permalinks, the permalink structure needs to include %category%
   for the plugin to work. For example:
 *  /%category%/%year%/%monthnum%/%post_id%/

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘[Plugin: WordPress Category Archive] Any patch for WP3.1?’ is closed 
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-category-archive.svg)
 * [WordPress Category Archive](https://wordpress.org/plugins/wp-category-archive/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-category-archive/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-category-archive/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-category-archive/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-category-archive/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-category-archive/reviews/)

 * 6 replies
 * 4 participants
 * Last reply from: [Hugh Mandeville](https://wordpress.org/support/users/hughmandeville/)
 * Last activity: [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-wordpress-category-archive-any-patch-for-wp31/#post-1997581)
 * Status: not resolved