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

WordPress Trac wp-trac at lists.automattic.com
Wed Aug 1 19:34:41 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:  critical                 |  Resolution:
 Keywords:  needs-patch needs-codex  |
-------------------------------------+------------------------------

Comment (by SergeyBiryukov):

 Replying to [comment:2 imageac]:
 > {{{
 > $wp_rewrite->flush_rules(false);
 > }}}

 Note that `$wp_rewrite->flush_rules()` call is only needed once after a
 new custom post type is added (as described in the Codex articles on
 [http://codex.wordpress.org/Rewrite_API/flush_rules flush_rules] and
 [http://codex.wordpress.org/Function_Reference/WP_Rewrite#Examples
 WP_Rewrite]), not on each page load.

 > Please help me to fix 404 error with custom post type.

 Have you tried disabling all plugins and switching to a default theme
 (Twenty Eleven on 3.4.1), then flushing rewrite rules once again?

 Until the exact bug is identified and confirmed, I'd suggest trying the
 support forums to get help: http://wordpress.org/support/

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


More information about the wp-trac mailing list