Here is an interesting question.
I have recently noticed that if you utilize the code
remove_meta_box('slugdiv', 'post', 'normal');
you are actually unable to modify the slug when you click on the url slug under the page title.
To clarify, when you use remove_meta_box for the slugdiv, the metabox and the screen options get removed however you are still able to click on the url under the post title to edit it… However, when you go to update/publish the post whatever modification you made does not take.
My objective is to remove the same metabox from the post edit screen AND remove it from the screen options page BUT I want to ensure that when you edit the slug under the post title that this still works.
Can anyone provide a solution to this problem? Thanks in advance.
The box which allows slug edition under the post title is actually tied to the slug metabox. It needs it to work. So, removing the metabox will break it.
The only solution, I think, would be to use javascript or css to hide it. Something like this will work:
I ended up just adding the following CSS to a css file I was calling in my functions.php file for the admin area:
This removed both the screen options and the metabox while still allowing me to edit the url under the title.
UPDATED
Based on the answer provided by FXFUTURE I modified his code by extending it and including the css values for screen options and the slug metabox while ensuring that the code only gets included on the post-new.php and post.php page.
You should call remove_meta_box in the add_meta_boxes hook to get it working. It tested on 4.0.
Rather than editing your css file you can use this in your functions.php: