Archive for custom taxonomy

You haven’t posted here the code for registering a taxonomy, but I’m going to assume that’s working. In your code for creating the custom post type, you have the taxonomies inside the labels array. This needs to be at the top level. Additionally, the value of taxonomies needs to be an array, even if it only has 1 item in it. See below. More information.

function create_post_type() {
  register_post_type( 'movies',
  array(
    'supports' => array('title', 'editor' , 'excerpt' , 'custom-fields'),
    'taxonomies'  => array( 'mvgen' ),
    'labels' => array(
      'name' => __( 'movies' ),
      'singular_name' => __( 'movies' ),
    ),
    'public' => true,
    'has_archive' => true,
  )   
  ); 
} 
add_action( 'init', 'create_post_type' );

Your template name looks correct to me, but you can always reference the template hierarchy to make sure you’re targeting the correct file name.

In addition, I find the Show Current Template plugin helps when trying to determine what file is being used.