title: Wordpress: custom taxonomy not showing up in admin column
body: <p>I don't know why the custom taxnonomy for a custom post type not showing up in admin column (it is disappeared).</p>
  <p><a href="https://i.stack.imgur.com/q3CVO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/q3CVO.png" alt="enter image description here" /></a></p>
  <p>The following is the code that <strong>always worked</strong>:</p>
  <pre><code>class SEW_SERVICE
  {
  
      function __construct() {
          add_action( 'init',  array($this, 'init') );
      }
  
      function init() {
          $this-&gt;taxonomies();
          $this-&gt;custom_posts();
      }
  
      function taxonomies() {
          $labels = array(
              'name' =&gt; __( 'Categorie Servizi', SEWCL_TEXT_DOMAIN ),
              'singular_name' =&gt; __( 'Categoria Servizio', SEWCL_TEXT_DOMAIN ),
              'search_items' =&gt; __( 'Search Menu Sections', SEWCL_TEXT_DOMAIN ),
              'all_items' =&gt; __( 'Tutte le categorie', SEWCL_TEXT_DOMAIN ),
              'parent_item' =&gt; __( 'Categoria', SEWCL_TEXT_DOMAIN ),
              'parent_item_colon' =&gt; __( 'Categoria Servizio:', SEWCL_TEXT_DOMAIN ),
              'edit_item' =&gt; __( 'Modifica Categoria Servizio', SEWCL_TEXT_DOMAIN ),
              'update_item' =&gt; __( 'Aggiorna Categoria Servizio', SEWCL_TEXT_DOMAIN ),
              'add_new_item' =&gt; __( 'Aggiungi Nuova Categoria', SEWCL_TEXT_DOMAIN ),
              'new_item_name' =&gt; __( 'Categoria Servizio', SEWCL_TEXT_DOMAIN )
          );
  
          $args = array(
              'hierarchical' =&gt; true, // Settare a false se invece di categorie si vogliono creare tag
              'labels' =&gt; $labels,
              'show_ui' =&gt; true,
              'show_admin_column' =&gt; true,
              'query_var' =&gt; true,
              'rewrite' =&gt; array( 'slug' =&gt; 'sew-servizi' ),
          );
  
          register_taxonomy( 'sew-categorie-servizi', null, $args);
      }
  
      function custom_posts() {
          register_post_type( 'sew-servizio',
              array(
                  'rewrite' =&gt; array( 'slug' =&gt; 'sew-servizio' ),
                  'labels' =&gt; array(
                      'name' =&gt; __('Lista Servizi', SEWCL_TEXT_DOMAIN),
                      'singular_name' =&gt; __('Servizo', SEWCL_TEXT_DOMAIN),
                      'add_new' =&gt; __('Aggiungi Servizo', SEWCL_TEXT_DOMAIN),
                      'add_new_item' =&gt; __('Aggiungi Nuovo Servizo', SEWCL_TEXT_DOMAIN),
                      'edit' =&gt; __('Modifica', SEWCL_TEXT_DOMAIN),
                      'edit_item' =&gt; __('Modifica Servizo', SEWCL_TEXT_DOMAIN),
                      'new_item' =&gt; __('Nuovo Servizo', SEWCL_TEXT_DOMAIN),
                      'view' =&gt; __('Visualizza', SEWCL_TEXT_DOMAIN),
                      'view_item' =&gt; __('Visualizza Servizo', SEWCL_TEXT_DOMAIN),
                      'search_items' =&gt; __('Cerca Servizo', SEWCL_TEXT_DOMAIN),
                      'not_found' =&gt; __('Nessuna servizio presente', SEWCL_TEXT_DOMAIN),
                      'not_found_in_trash' =&gt; __('Nessun servizio presente nel cestino', SEWCL_TEXT_DOMAIN),
                      'parent' =&gt; __('Parent Movie Review', SEWCL_TEXT_DOMAIN)
                  ),
                  'public' =&gt; true,
                  'menu_position' =&gt; 15,
                  'supports' =&gt; array( 'title', 'editor', 'thumbnail', 'custom-fields', 'page-attributes'  ),
                  'taxonomies' =&gt; array( 'sew-categorie-servizi' ),
                  'menu_icon' =&gt; 'dashicons-list-view',
                  'has_archive' =&gt; true,
                  'exclude_from_search' =&gt; false,
                  'show_in_nav_menus' =&gt; false,
              )
          );
      }
  }
  </code></pre>
  <p>as described here:</p>
  <p><a href="https://codex.wordpress.org/Function_Reference/register_taxonomy" rel="nofollow noreferrer">https://codex.wordpress.org/Function_Reference/register_taxonomy</a></p>
  <p>the second parameter is set to null because I associate the taxonomy to the custom post type when I use <strong>register_post_type()</strong></p>
  <p>I don't know why the code has stop to work. I use this code from 3 years.</p>
  <p><strong>The taxonomy exists. If I try to access it via URL, it works:</strong></p>
  <p>/wp-admin/edit-tags.php?taxonomy=sew-categorie-servizi&amp;post_type=sew-servizio</p>
  <p><a href="https://i.stack.imgur.com/Tooti.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Tooti.png" alt="enter image description here" /></a></p>
  <p>Seems that the taxonomy is not associated to the custom post. In fact, in the editing screen of a post, it is not even visible anymore the box to associate the post with the taxonomy</p>
  <p>Any ideas?</p>
  <h2>UPDATE</h2>
  <p>I also tried to put everything in chronological order but it doesn't work anyway</p>
  <pre><code>function custom_posts() {
      register_post_type( 'sew-servizio',
          array(
              'rewrite' =&gt; array( 'slug' =&gt; 'sew-servizio' ),
              'labels' =&gt; array(
                  'name' =&gt; __('Lista Servizi', SEWCL_TEXT_DOMAIN),
                  'singular_name' =&gt; __('Servizo', SEWCL_TEXT_DOMAIN),
                  'add_new' =&gt; __('Aggiungi Servizo', SEWCL_TEXT_DOMAIN),
                  'add_new_item' =&gt; __('Aggiungi Nuovo Servizo', SEWCL_TEXT_DOMAIN),
                  'edit' =&gt; __('Modifica', SEWCL_TEXT_DOMAIN),
                  'edit_item' =&gt; __('Modifica Servizo', SEWCL_TEXT_DOMAIN),
                  'new_item' =&gt; __('Nuovo Servizo', SEWCL_TEXT_DOMAIN),
                  'view' =&gt; __('Visualizza', SEWCL_TEXT_DOMAIN),
                  'view_item' =&gt; __('Visualizza Servizo', SEWCL_TEXT_DOMAIN),
                  'search_items' =&gt; __('Cerca Servizo', SEWCL_TEXT_DOMAIN),
                  'not_found' =&gt; __('Nessuna servizio presente', SEWCL_TEXT_DOMAIN),
                  'not_found_in_trash' =&gt; __('Nessun servizio presente nel cestino', SEWCL_TEXT_DOMAIN),
                  'parent' =&gt; __('Parent Movie Review', SEWCL_TEXT_DOMAIN)
              ),
              'public' =&gt; true,
              'menu_position' =&gt; 15,
              'supports' =&gt; array( 'title', 'editor', 'thumbnail', 'custom-fields', 'page-attributes'  ),
              //'taxonomies' =&gt; array( 'sew-categorie-servizi' ),
              'menu_icon' =&gt; 'dashicons-list-view',
              'has_archive' =&gt; true,
              'exclude_from_search' =&gt; false,
              'show_in_nav_menus' =&gt; false,
              /*
              'capabilities' =&gt; array(
                  'edit_post' =&gt; 'update_core',
                  'delete_post' =&gt; 'update_core',
                  'edit_posts' =&gt; 'update_core',
                  'edit_others_posts' =&gt; 'update_core',
                  'publish_posts' =&gt; 'update_core',
                  'read_private_posts' =&gt; 'update_core'
              ),
              */
          )
      );
      
      $labels = array(
          'name' =&gt; __( 'Categorie Servizi', SEWCL_TEXT_DOMAIN ),
          'singular_name' =&gt; __( 'Categoria Servizio', SEWCL_TEXT_DOMAIN ),
          'search_items' =&gt; __( 'Search Menu Sections', SEWCL_TEXT_DOMAIN ),
          'all_items' =&gt; __( 'Tutte le categorie', SEWCL_TEXT_DOMAIN ),
          'parent_item' =&gt; __( 'Categoria', SEWCL_TEXT_DOMAIN ),
          'parent_item_colon' =&gt; __( 'Categoria Servizio:', SEWCL_TEXT_DOMAIN ),
          'edit_item' =&gt; __( 'Modifica Categoria Servizio', SEWCL_TEXT_DOMAIN ),
          'update_item' =&gt; __( 'Aggiorna Categoria Servizio', SEWCL_TEXT_DOMAIN ),
          'add_new_item' =&gt; __( 'Aggiungi Nuova Categoria', SEWCL_TEXT_DOMAIN ),
          'new_item_name' =&gt; __( 'Categoria Servizio', SEWCL_TEXT_DOMAIN )
      );
      
      $args = array(
          'hierarchical' =&gt; true, // Settare a false se invece di categorie si vogliono creare tag
          'labels' =&gt; $labels,
          'show_ui' =&gt; true,
          'show_admin_column' =&gt; true,
          'query_var' =&gt; true,
          'rewrite' =&gt; array( 'slug' =&gt; 'sew-servizi' ), // Url /sew-servizi/nome-servizio
      );
      
      register_taxonomy( 'sew-categorie-servizi', array('sew-servizio'), $args);    
  }
  </code></pre>
  <h2>SOLVED</h2>
  <p>add_action( 'init',  array($this, 'init'), PHP_MAX_INT );</p>