[wp-trac] [WordPress Trac] #13712: When Pretty Permalinks Enabled Custom Post Types 404 Not Found
WordPress Trac
wp-trac at lists.automattic.com
Mon Jun 14 12:32:15 UTC 2010
#13712: When Pretty Permalinks Enabled Custom Post Types 404 Not Found
--------------------------+-------------------------------------------------
Reporter: jackreichert | Owner: ryan
Type: defect (bug) | Status: new
Priority: high | Milestone: Unassigned
Component: Permalinks | Version: 3.0
Severity: major | Keywords: RC3, post types,
--------------------------+-------------------------------------------------
Changes (by ryno267):
* keywords: => RC3, post types,
* priority: normal => high
* severity: normal => major
Comment:
having a very similar issue w/ RC3. Custom post types work fine on
default /?type=post-name-here but 404 when permalinks enabled. Code
entails:
{{{
add_action('init', 'events_post_type');
function events_post_type() {
$args = array(
'label' => _('Events'),
'singular_label' => _('Event'),
'public' => true,
'show_ui' => true,
'capability_type' => 'post',
'hierarchical' => true,
'rewrite' => array(
'slug' => 'events',
'with_front' => false,
),
'supports' => array('title', 'thumbnail', 'editor',
'custom-fields', 'excerpt', 'page-attributes')
);
register_post_type('events', $args);
register_taxonomy_for_object_type('event_type', 'events');
register_taxonomy_for_object_type('post_tag', 'events');
}
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/13712#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list