I am fairly new to Wordpress (but been on the PHP circuit for a minute) and developing a plugin. I have created a custom post type with the following:
function create_post_type() {
$result = register_post_type( 'wcdoe_summary',
array(
'labels' => array(
'name' => __('Woocommerce Order Summaries'),
'singular_name' => __( 'Woocommerce Order Summary' )
),
'public' => true,
'publicly_queryable' => false,
'show_ui' => true,
'show_in_menu' => true,
'show_in_admin_bar' => false,
'capability_type' => 'post',
'has_archive' => true,
'hierarchical' => false,
'menu_position' => null,
'exclude_from_search' => true,
'query_var' => 'wcdoe_summary'
)
);
}
add_action( 'init', 'create_post_type' );
I am able to add posts of this type, but when I go to the Admin page to view the posts, I see "All (48) Mine (19) No posts found".
I have tried this: Custom Taxonomy with Custom Post Type Finds No Posts and saving my permalinks page to no avail. I do not currently have a taxonomy tied to this post type, but I tried that as well.
Am I misunderstanding what the show_ui setting does? Do I need to set the logic somewhere for the posts to display?
Any advice would be greatly appreciated!
init
action? everything otherwise looks ok.