WordPress – Hide taxonomy fields in QuickEdit

after creating taxonomies for a custom post type, they all show up in QuickEdit. I’m trying to hide them to use the menu for other custom fields but don’t know how to do it. Appreciate for any help.

Related posts

Leave a Reply

4 comments

  1. Even better, when registering the taxonomy, you can now pass this to the register_taxonomy function, as shown here:

    'show_in_quick_edit' => false
    

    This seems to be working since WordPress 4.2.

  2. add_filter('quick_edit_show_taxonomy', 'listing_remove_taxonomy_from_quick_edit', 10, 3);
    
    function remove_taxonomy_from_quick_edit($show_in_quick_edit, $taxonomy_name, $post_type) {
        if ('post_type' === $post_type) {
            return false;
        }
        return $show_in_quick_edit;
    }
    

    Hope this will work

  3. Try doing by javascript. (I use jquery).

    jQuery(document).ready(function($){'use strict';
    
    if ($('.post-type-custom').length) {        
        $('.taxonomy-checklist').prev().prev().hide(); // to hide title
        $('.taxonomy-checklist').hide(); //to hide box  
    } });
    

    add this code to a js file (lets say customadmin.js and assume its in the js folder that is in the theme folder) and enqueue the file on admin side:

    if(!function_exists('addstyle_to_admin')):
    function addstyle_to_admin() {
        if(is_admin()){
            wp_enqueue_script('myadminpanelscript',get_template_directory_uri() . '/js/customadmin.js',array('jquery'),false,false);
        }
    }
    add_action('admin_enqueue_scripts','addstyle_to_admin');
    endif;