prashantcs053
7/3/2017 - 1:30 PM

hide publish button from CPT

hide publish button from CPT

add_action('admin_footer', 'admin_footer_css');

function admin_footer_css() {
    $screen = get_current_screen();
    if (is_object($screen) && $screen->base == 'post' && $screen->post_type == 'retailers') {
        echo '<style>';
        echo '.post-type-retailers input[name="publish"] { display:none !important }.post-type-retailers input[name="save"] { display:block !important }';
        echo '</style>';
    }
}