Custom Admin Page Not From the Menu

I understand I can associate CPTs in submenus like so: Is It Possible To Add Custom Post Type Menu As Another Custom Post Type Sub Menu

However, my question is if I have on CPT, let’s say for a ECommerce type of post type, so it would be Orders and I have orders with different meta information in their post_meta such as approved, pending, denied, etc. can I have submenus which load an admin table using WP_List_Table of a subset of the custom post type.

So the admin menu looks like

-Orders CPT (Show All in List)
–Approved Orders (Show only Approved Orders in List)
–Denied Orders (Show only Denied Orders in List)

etc.

The reason I am asking is because at first I was doing add_menu() or add_submenu() with a custom callback to generate the HTML, but then I realized this was unnecessary as I was ending up recreating the default WP_List_Table, but I don’t want multiple CPTs when they are all really subsets of the same CPT differentiated by meta-data… is this possible or should I do different CPTs?

Read more here:: Custom Admin Page Not From the Menu

Leave a Reply

Your email address will not be published. Required fields are marked *