[wp-trac] [WordPress Trac] #21417: Custom Post Type Permalink Returns 404 Error

WordPress Trac wp-trac at lists.automattic.com
Sat Sep 8 21:11:01 UTC 2012


#21417: Custom Post Type Permalink Returns 404 Error
--------------------------+------------------------------
 Reporter:  imageac       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Permalinks    |     Version:  3.4.1
 Severity:  minor         |  Resolution:
 Keywords:                |
--------------------------+------------------------------
Changes (by wonderboymusic):

 * keywords:  needs-patch needs-codex =>
 * severity:  critical => minor


Comment:

 You hook seems incorrect to me - when adding custom rewrite rules, it is
 safer to use this action or filter:

 {{{
 do_action_ref_array('generate_rewrite_rules', array(&$this));
 $this->rules = apply_filters('rewrite_rules_array', $this->rules);
 }}}

 Here's a great example:

 http://bbpress.trac.wordpress.org/browser/branches/2.1/bbpress.php#L830

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/21417#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list