[wp-trac] [WordPress Trac] #16323: Hierarchical Custom Post Type Bug - invalid name query var generated
WordPress Trac
wp-trac at lists.automattic.com
Fri Jan 21 13:19:02 UTC 2011
#16323: Hierarchical Custom Post Type Bug - invalid name query var generated
--------------------------+------------------------------
Reporter: jrcowher | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Permalinks | Version: 3.0.4
Severity: normal | Resolution:
Keywords: |
--------------------------+------------------------------
Comment (by jrcowher):
Replying to [comment:3 scribu]:
> Please paste the full code you're using to register the post type.
{{{
function post_type_service() {
register_post_type(
'service', array(
'labels' => array(
'name' => 'Services',
'singular_name' => 'Service',
'add_new' => 'Add new',
'add_new_item' => 'Add new service',
'edit_item' => 'Edit service',
'search_items' => 'Search services',
'not_found' => 'No services found',
'not_found_in_trash' => 'No services found in
trash',
),
'menu_position' => 20,
'public' => true,
'show_ui' => true,
'hierarchical' => true,
'query_var' => false,
'exclude_from_search' => false,
'supports' => array(
'title',
'editor',
'page-attributes'
)
));
register_taxonomy(
'service-cats', 'service', array(
'hierarchical' => true, // Category or Tag
functionality
'labels' => array(
'name' => 'Categories',
'singular_name' => 'Category',
'search_items' => 'Search categories',
'popular_items' => 'Popular categories',
'all_items' => 'All categories',
'parent_item' => null,
'parent_item_colon' => null,
'edit_item' => 'Edit category',
'update_item' => 'Update category',
'add_new_item' => 'Add new category',
'new_item_name' => 'New category',
'separate_items_with_commas' => 'Separate
categories with commas',
'add_or_remove_items' => 'Add or remove
categories',
'choose_from_most_used' => 'Choose from most
used categories'
)
)
);
}
add_action('init', 'post_type_service');
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16323#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list