In the register_post_status
, I’ve already disabled
show_in_admin_all_list
& show_in_admin_status_list
for my custom status my_hidden_status
However, from the query log the post_status my_hidden_status
is still not being filtered out (when loading edit.php)
e.g.
SELECT post_status, COUNT( * ) AS num_posts FROM st_posts WHERE
post_type = 'my_cpt' GROUP BY post_status;
The post_status I wanted to filter is actually over 90% of my CPT, so
if the query is rewritten as
SELECT post_status, COUNT( * ) AS num_posts FROM st_posts WHERE
post_type = 'my_cpt' AND post_status != 'my_hidden_status' GROUP BY
post_status;
It can greatly improve performance.
Is this a bug?