WordPress: When I open tag get a 404 error?

I have a website for movies. I made a tag function imdb rating that looks like this:

add_action( 'init', 'create_pc_db_taxonomies', 0 );

function create_pc_db_taxonomies() {
    register_taxonomy( 'imdb', 'post', array( 'hierarchical' => false, 'label' => __('imdb', 'series'), 'query_var' => 'imdb', 'rewrite' => array( 'slug' => 'imdb' ) ) );
    register_taxonomy( 'yapim', 'post', array( 'hierarchical' => false, 'label' => __('Godina izdanja', 'series'), 'query_var' => 'yapim', 'rewrite' => array( 'slug' => 'yapim' ) ) );
}

To print tags using this code:

Read More
<?php the_terms( $post->ID, 'imdb', '<span>IMDB rating:</span> ',',', '/10<br />' ); ?>

IMDB rating is printed, but when I open the tag get a 404 error. As if the tag does not exist. The equivalent function for years works fine.

Related posts

Leave a Reply