[ad_1]
I realise this plugin sorts boths pages and custom post types but I only want to allow reordering CPTs. Is there a way to exclude pages?
I saw the code to exclude CPTs is as follows and I tried replacing ‘excluded_post_type’ with common numbers like 1, 2 & 3 but it didn’t seem to work. What is the Pages post_type_id and does it work with this code snippet? Thanks
add_filter( 'simple_page_ordering_is_sortable', function( $sortable, $post_type ) {
if ( 'excluded_post_type' === $post_type ) {
return false;
}
return $sortable;
}, 10, 2 );
