Is there a way to replace the WP_List_Table object of a post type to display said post type differently on the Admin edit.php page?
2 Answers
No, you cannot replace the list table. There is no filter, everything is hard-coded.
But you can change the post type registration, set show_ui
to FALSE
to prevent the built-in page, and add a custom page for the post type listing to show the editable items.
add_action( 'wp_loaded', function(){
register_post_type(
'test',
array(
'labels' => array(
'name' => 'TEST'
),
'public' => TRUE,
'show_ui' => FALSE
)
);
});
add_action( 'admin_menu', function(){
add_object_page(
'TEST',
'TEST',
'edit_test',
'test',
function(){
echo 'test'; // list post type items here
}
);
});
Result