• Resolved kevkong1

    (@kevkong1)


    I’m trying to remove the ‘Custom Sidebar’ column from a custom post type admin list. I can remove all of the others I don’t need except this. I’m thinking I have the name wrong (custom-sidebars), see below:

    if ( ! function_exists( ‘custom_manage_posts_column’ ) ) {
    function custom_manage_posts_column( $columns ) {
    unset( $columns[‘date’] );
    unset( $columns[‘custom-sidebars’] );
    return $columns;
    }
    }
    if ( has_filter( ‘manage_posts_columns’ ) ) {
    add_filter( ‘manage_posts_columns’, ‘custom_manage_posts_column’ );
    }

    Any help would be appreciated…

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello @kevkong1 ,

    Let me check that with developers and I will let you know what they say about this.

    kind regards,
    Kasia

    Hello @kevkong1

    I trust you’re doing well!

    I apologize for the late reply!

    We got feedback from our developers. The key in the code should be cs_replacement. For example please see here:
    unset( $columns['cs_replacement'] );

    The Custom Sidebars plugin has a filter for that cs_support_posttype which can be used like :

    add_filter( 'cs_support_posttype', function( $response, $posttype ){
    
        if ( 'the_cpt' == $posttype ) {
            return false;
        }
    
        return $response;
    }, 20, 2 );

    Hope this helps!

    Cheers,
    Nastia

    Hello @kevkong1,

    Hope you’re doing well!

    We’ve not heard from you in a while. I’ve marked this ticket as resolved for now, but if you need anything else at all, we’re here for you, please just reopen the ticket or create a new one.

    Hope you’re doing well!

    Cheers,
    Nastia

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Remove Custom Sidebar column from custom post admin’ is closed to new replies.