• First of all, thanks a lot for your work and this plugin.

    I use it on a project and it works perfectly. However, I would like to exclude one precise CPT from the post type switcher functionnality in order to prevent a post type switch that would be unwanted. It would harm my website.

    Coult it be a feature request ? This could be achieved with something like this piece of code :

    /**Disable Post Type Switcher for tge CPT "my-cpt"
    */
    add_filter( 'pts_post_type_filter', function( $post_types, $post ) {
    // remove CPT "my-cpt" from post-types list
    if ( isset( $post_types['my-cpt'] ) ) {
    unset( $post_types['my-cpt'] );
    }
    return $post_types;
    }, 10, 2 );

    If this feature is not accurate with your project, do you think it can survive to future updates of your plugin ?

    Thanks again !

The topic ‘How to exclude one custom post type from the post type switch list ?’ is closed to new replies.