Skip to content

Instantly share code, notes, and snippets.

@Bobz-zg
Last active January 30, 2019 03:06
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 Bobz-zg/e0edba1a4b60edc6ae27cec9a4cbd250 to your computer and use it in GitHub Desktop.
Save Bobz-zg/e0edba1a4b60edc6ae27cec9a4cbd250 to your computer and use it in GitHub Desktop.
Remove 'Category' from 'Quick edit' screen in WordPress admin
<?php
/**
* Filters whether the current taxonomy should be shown in the Quick Edit panel.
*
* @since 4.2.0
*
* @param bool $show_in_quick_edit Whether to show the current taxonomy in Quick Edit.
* @param string $taxonomy_name Taxonomy name.
* @param string $post_type Post type of current Quick Edit post.
*/
add_filter( 'quick_edit_show_taxonomy', function( $show, $taxonomy_name, $view ) {
// Add your logic here
if ( 'category' == $taxonomy_name )
return false;
return $show;
}, 10, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment