Title: blabbr's Replies | WordPress.org

---

# blabbr

  [  ](https://wordpress.org/support/users/blabbr/)

 *   [Profile](https://wordpress.org/support/users/blabbr/)
 *   [Topics Started](https://wordpress.org/support/users/blabbr/topics/)
 *   [Replies Created](https://wordpress.org/support/users/blabbr/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/blabbr/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/blabbr/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/blabbr/engagements/)
 *   [Favorites](https://wordpress.org/support/users/blabbr/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom Post Type Archives] [Plugin: Custom Post Type Archives] paging problem with yearly/monthly archives](https://wordpress.org/support/topic/plugin-custom-post-type-archives-paging-problem-with-yearlymonthly-archives/)
 *  [blabbr](https://wordpress.org/support/users/blabbr/)
 * (@blabbr)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-custom-post-type-archives-paging-problem-with-yearlymonthly-archives/#post-2486544)
 * Hey the two of you!
 * i experienced the exactly same problem.
    The problem seems to be that as soon
   as you have paged monthly or yearly archives, the plugin isn’t able to handle
   that.
 * i had a look at the code and found this fix:
 * IN THE FOLDER custom-post-type-archives IN THE FILE post-type-archives.php LOCATE
   THIS CODE:
 *     ```
       $custom_rules["$url_base($post_type)/([0-9]+)/([0-9]{1,2})/([0-9]{1,2})/?$"] = // enable listing by day
       				"index.php?post_type_index=1&post_type=$post_type_slug&year=" . $wp_rewrite->preg_index(2) . '&monthnum=' . $wp_rewrite->preg_index(3) . '&day=' . $wp_rewrite->preg_index(4);
       			$custom_rules["$url_base($post_type)/([0-9]+)/([0-9]{1,2})/?$"] = // enabled listing by month
       				"index.php?post_type_index=1&post_type=$post_type_slug&year=" . $wp_rewrite->preg_index(2) . '&monthnum=' . $wp_rewrite->preg_index(3);
       			$custom_rules["$url_base($post_type)/([0-9]+/?$)"] = // enable listing by year
       				"index.php?post_type_index=1&post_type=$post_type_slug&year=" . $wp_rewrite->preg_index(2);
       ```
   
 * AND REPLACE ALL OF IT WITH THIS CODE
 *     ```
       $custom_rules["$url_base($post_type)/([0-9]{1,4})/([0-9]{1,2})/([0-9]{1,2})/page/([0-9]{1,})/?$"] = // ### FIX: enable listing by day + paging
       				"index.php?post_type_index=1&post_type=$post_type_slug&year=" . $wp_rewrite->preg_index(2) . '&monthnum=' . $wp_rewrite->preg_index(3) . '&day=' . $wp_rewrite->preg_index(4) . "&paged=" . $wp_rewrite->preg_index(5);
       			$custom_rules["$url_base($post_type)/([0-9]{1,4})/([0-9]{1,2})/([0-9]{1,2})/?$"] = // enable listing by day
       				"index.php?post_type_index=1&post_type=$post_type_slug&year=" . $wp_rewrite->preg_index(2) . '&monthnum=' . $wp_rewrite->preg_index(3) . '&day=' . $wp_rewrite->preg_index(4);
       			$custom_rules["$url_base($post_type)/([0-9]{1,4})/([0-9]{1,2})/page/([0-9]{1,})/?$"] = // ### FIX: enable listing by month + paging
       				"index.php?post_type_index=1&post_type=$post_type_slug&year=" . $wp_rewrite->preg_index(2) . '&monthnum=' . $wp_rewrite->preg_index(3) . "&paged=" . $wp_rewrite->preg_index(4);
       			$custom_rules["$url_base($post_type)/([0-9]{1,4})/([0-9]{1,2})/?$"] = // enabled listing by month
       				"index.php?post_type_index=1&post_type=$post_type_slug&year=" . $wp_rewrite->preg_index(2) . '&monthnum=' . $wp_rewrite->preg_index(3);
       			$custom_rules["$url_base($post_type)/([0-9]{1,4})/page/([0-9]{1,})/?$"] = // ### FIX: enable listing by year + paging
       				"index.php?post_type_index=1&post_type=$post_type_slug&year=" . $wp_rewrite->preg_index(2) . "&paged=" . $wp_rewrite->preg_index(3);
       			$custom_rules["$url_base($post_type)/([0-9]{1,4})/?$"] = // enable listing by year
       				"index.php?post_type_index=1&post_type=$post_type_slug&year=" . $wp_rewrite->preg_index(2);
       ```
   
 * NOW NOTE THIS:
    – after doing this you have to update your permalinks – i don’t
   give you a guarantee that this will work – it won’t break something major though
   🙂 – only works if you use rewrite slugs from the plugin’s options (haven’t looked
   into not using slugs…) – brought to you by [http://www.kition.net](http://www.kition.net)
   😉 – i’ve only tested it for the yearly archives because i don’t have monthly
   or daily archives big enough to be paginated (and i don’t feel like creating 
   some pages right now…)
 * hope it works for you guys! if not, drop a line, i might be able to help out…
 * cheers, phil
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Cloning a WordPress Plugin](https://wordpress.org/support/topic/cloning-a-wordpress-plugin/)
 *  Thread Starter [blabbr](https://wordpress.org/support/users/blabbr/)
 * (@blabbr)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/cloning-a-wordpress-plugin/#post-267124)
 * Hmm, I’m afraid, it’s not that easy … (or it is and I just can’t do it)
 * anyways: I made a copy of the WPG2-plugin folder. Then I tried activating the
   plugin in the admin panel, but then of course the expected php error came about:
   it couldn’t redeclare a function previously defined by the original plugin.
 * So – would I need to rename all the functions?
    And – what do you exactly mean
   by “edit its header information”? Where can this “header information” be found?
 * Thanks anyway for your help.

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