Sep 01, 2023  

Sometimes WordPress, when upgrading, introduces new sections we do not necessarily need or will use.
There’s a simple code to add that will disable them. (Source Code)

For example, I want to remove the “Do not sell info” section.
So first of all I will be checking what’s the custom post type name for that, by going into the section from the Dashboard and check on the link bar

Now the code to add in your theme functions.php

// Deregister Custom Post Type
function delete_post_type(){
unregister_post_type( 'blocks' );

In this case we will write unregister_post_type( ‘donotsellrequests’ ) as we retrieved the custom post type name from the link.

And that’s it, the block has now disappeared from our Dashboard