Admin not showing all custom post type posts and views not working
Question
I have a custom post type called pasakumi and for some reason in wp-admin the views (All / Published / Trash) are showing only 4 random posts, even though I have more than that. They’re also not working, for example, ‘Trash (1)’ is showing the same 4 posts as ‘All’ (see gif below).
If I create a new post, it just replaces one of the 4 shown.
The following are the arguments from functions.php I have for the custom post type. Maybe I need to change something here?
$args = [
"label" => __( "Pasākumi", "custom-post-type-ui" ),
"labels" => $labels,
"description" => "",
"public" => true,
"publicly_queryable" => true,
"show_ui" => true,
"delete_with_user" => false,
"show_in_rest" => true,
"rest_base" => "",
"rest_controller_class" => "WP_REST_Posts_Controller",
"has_archive" => true,
"show_in_menu" => true,
"show_in_nav_menus" => true,
"delete_with_user" => false,
"exclude_from_search" => false,
"capability_type" => "post",
"map_meta_cap" => true,
"hierarchical" => false,
"rewrite" => [ "slug" => "pasakumi", "with_front" => true ],
"query_var" => true,
"menu_position" => 4,
"menu_icon" => "dashicons-post-status",
"supports" => [ "title", "editor", "custom-fields" ],
];
Any help will be appreciated!
0
custom-post-types, wp-admin
1 year
0 Answers
88 views
0
Leave an answer
You must login or register to add a new answer .