Remove Trash / Delete option for Custom Post Type / Taxonomy
Try these: /** * Removes the “Trash” link on the individual post’s “actions” row on the posts * edit page. */ add_filter( ‘post_row_actions’, ‘remove_row_actions_post’, 10, 2 ); function remove_row_actions_post( $actions, $post ) { if( $post->post_type === ‘prj’ ) { unset( $actions[‘clone’] ); unset( $actions[‘trash’] ); } return $actions; } add_action(‘wp_trash_post’, ‘restrict_post_deletion’); function restrict_post_deletion($post_id) { if( … Read more