[wp-trac] [WordPress Trac] #13755: Custom Post Type/Taxonomy in non-published status

WordPress Trac wp-trac at lists.automattic.com
Mon Jun 7 06:55:35 UTC 2010


#13755: Custom Post Type/Taxonomy in non-published status
----------------------------+-----------------------------------------------
 Reporter:  ajferg          |       Owner:     
     Type:  defect (bug)    |      Status:  new
 Priority:  high            |   Milestone:  3.0
Component:  Administration  |     Version:  3.0
 Severity:  major           |    Keywords:     
----------------------------+-----------------------------------------------
 I'm using a custom post type (product) and taxonomy (brand), and have
 discovered a problem in the admin area with WP3.0 RC2

 I have some 'products' as Private, and some Published.  Visiting:
 wp-admin/edit.php?brand=abs&post_type=product&post_status=any
 only shows the Published ones.  I haven't been able to find any way to
 display posts of Product type, in a particular brand, with a non-published
 status.


 This is how I'm declaring my custom type/tax.  I've tried plenty of
 variations with the args.
 {{{
 // Set up custom Post Types & Taxonomies
 add_action('init', 'register_custom_post_types', 7);
 function register_custom_post_types() {
         register_post_type('product', array(
                 'labels' => array(
                         'name' => 'Products',
                         'singular_name' => 'Product',
                         'edit' => 'Products',
                         'add_new' => 'Add Product',
                 ),
                 'public' => true,
                 'capability_type' => 'post',
                 'publicly_queryable' => true,
                 'exclude_from_search' => false,
                 'show_ui' => true,
                 'query_var' => true,
                 '_edit_link' => 'post.php?post=%d',
                 'capability_type' => 'post',
                 'hierarchical' => false,
                 'menu_position' => null,
                 'rewrite' => array('slug' => 'products'),
                 'supports' => array( 'title', 'editor', 'excerpt',
 'author', 'thumbnail' )
         ));
         register_taxonomy( 'brand', array('product'), array(
                 'labels' => array(
                         'name' => 'Brands',
                         'singular_name' => 'Brand',
                         'search_items' => 'Search Brands',
                         'popular_items' => 'Popular Brands',
                         'all_items' => 'All Brands',
                 ),
                 'public' => true,
                 'show_ui' => true,
                 'show_tagcloud' => false,
                 'hierarchical' => true,
         ));
         // Unnecessary?
         register_taxonomy_for_object_type('brand', 'product');
         // This might save some 404 problems?
         global $wp_rewrite;
         $wp_rewrite->flush_rules();
 }
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/13755>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list