Title: noblestreet's Replies | WordPress.org

---

# noblestreet

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

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

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[CPT-onomies: Using Custom Post Types as Taxonomies] 404 page when accessing CPT-onomy post](https://wordpress.org/support/topic/404-page-when-accessing-cpt-onomy-post/)
 *  Thread Starter [noblestreet](https://wordpress.org/support/users/noblestreet/)
 * (@noblestreet)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/404-page-when-accessing-cpt-onomy-post/#post-4861851)
 * Ok in the meantime i have done some diggin around my self. I ended up going thru
   the class-wp.php file (WP::parse_request). I came up with the following rewrite
   rule which works with my CPT.
 *     ```
       function add_cpt_rules() {
         global $wp_rewrite;
         add_rewrite_rule(
           "showcase/([^/]+)(/[0-9]+)?/?$",
           "index.php?showcase=" . $wp_rewrite->preg_index(1) . "&page=" . $wp_rewrite->preg_index(2),
           "top");
   
         add_rewrite_rule(
           "work/([^/]+)(/[0-9]+)?/?$",
           "index.php?work=" . $wp_rewrite->preg_index(1) . "&page=" . $wp_rewrite->preg_index(2),
           "top");
   
         $wp_rewrite->flush_rules();
       }
       add_action( 'init', 'add_cpt_rules' );
       ```
   
 * showcase and work are my additional CPTs i removed the extra template include
   function. As WP now grabs the post_type for the relevant template file.
 * Using Debug This plugin helped a lot. ([http://websynthesis.com/fixing-wordpress-404-errors/](http://websynthesis.com/fixing-wordpress-404-errors/))
 * regards,
 * Arnaud

Viewing 1 replies (of 1 total)