Skip to content

Instantly share code, notes, and snippets.

@feliciaceballos
Created April 29, 2016 21:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save feliciaceballos/571f58bddb02e3a12d14685e1a40e34a to your computer and use it in GitHub Desktop.
Save feliciaceballos/571f58bddb02e3a12d14685e1a40e34a to your computer and use it in GitHub Desktop.
Hide items in Publish box
function hide_publishing_actions(){
$my_post_type = 'post';
global $post;
if($post->post_type == $my_post_type){
echo '
<style type="text/css">
.misc-pub-section.misc-pub-post-status,
.misc-pub-section.misc-pub-visibility,
#minor-publishing-actions,
#delete-action{
display:none;
}
</style>
';
}
}
add_action('admin_head-post.php', 'hide_publishing_actions');
add_action('admin_head-post-new.php', 'hide_publishing_actions');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment