0
votes

For the life of me, I can not figure this out.

I set up a custom post type in WordPress like so:

register_post_type( 'myposttype',
    array(
        'labels' => array(
            'name' => __( 'MyPostTypeName' ),
            'singular_name' => __( 'MyPostTypeName' )
        ),
        'public' => true,
        'has_archive' => true,
        'supports' => array('title', 'custom-fields')

    )
);

When I first started I added add_filter( 'map_meta_cap', 'my_map_meta_cap', 10, 4 ); with some basic capabilities. I think I may have set that part up wrong, but I quickly got rid of it and returned the post type to normal capabilities.

Now whenever I try to access the custom post type in my admin, I run into some weird problems. Namely, no matter what Post status I click on (Published, Drafts, Private, etc.) I only get published posts. Also sorting the columns and other similar admin functions don't work at all. It's like edit.php is completely broken, but only for this specific custom post type. It works just fine on all other custom post types.

I've tried everything, right down to deleting every mention of the custom post type from the admin panel and then trying to register it again, and nothing works. I really need to keep the slug from the custom post type the same, but I'd be open to registering a new post type, moving posts over and then changing the slug I just can't figure out a good way to do it.

Anyway, I'd appreciate any help in figuring out how to fix the custom post type admin panel.

Thanks

1

1 Answers

0
votes

Do you have a "posts_orderby" filter added anywhere?