Hello,
I have a website for movies. I made a tag function imdb rating that looks like this:
// Add new "IMDB" taxonomy to Posts
register_taxonomy('imdb', 'post', array(
// Hierarchical taxonomy (like categories)
'hierarchical' => false,
// This array of options controls the labels displayed in the WordPress Admin UI
'labels' => array(
'name' => _x( 'IMDB', 'taxonomy general name' ),
'singular_name' => _x( 'IMDB rating', 'taxonomy singular name' ),
'search_items' => __( 'Search IMDB rating' ),
'all_items' => __( 'All IMDB rating' ),
'edit_item' => __( 'Edit IMDB rating' ),
'update_item' => __( 'Update IMDB rating' ),
'add_new_item' => __( 'Add new IMDB rating' ),
'new_item_name' => __( 'Add new name' ),
'menu_name' => __( 'IMDB rating' ),
),
// Control the slugs used for this taxonomy
'rewrite' => array(
'slug' => 'imdb', // This controls the base slug that will display before each term
'with_front' => false, // Don't display the category base before "/locations/"
'hierarchical' => false // This will allow URL's like "/locations/boston/cambridge/"
),
));
To print tags using this code:
<?php the_terms( $post->ID, 'imdb', '<span>IMDB ocjena:</span> ',',','/10<br />' ); ?>
IMDB rating is printed, but when I open the tag get a 404 error. As if the tag does not exist.
While the functions of tags, which is the default in WordPress works. There I put tags actors and opens it.
Sorry for my bad English