Support » How-To and Troubleshooting » Custom Post Type with Tags

Custom Post Type with Tags

  • Hello, I have created a new Custom Post Type and would like to know how to use the default WordPress Tags feature with it.

    The same tag functionality that is available to the default post type.

    I created the custom post type by placing the following code in the funcitons.php file:

    add_action('init', 'movie_register');
    function movie_register() {
    	$labels = array(
    		'name' => _x('Movies', 'movie type general name'),
    		'singular_name' => _x('Movie', 'deail type singular name'),
    		'add_new' => _x('Add New', 'movie item'),
    		'add_new_item' => __('Add New Movie Item'),
    		'edit_item' => __('Edit Movie Item'),
    		'new_item' => __('New Movie Item'),
    		'view_item' => __('View Portfolio Item'),
    		'search_items' => __('Search Movie'),
    		'not_found' =>  __('Nothing found'),
    		'not_found_in_trash' => __('Nothing found in Trash'),
    		'parent_item_colon' => ''
    	$args = array(
    		'labels' => $labels,
    		'public' => true,
    		'publicly_queryable' => true,
    		'show_ui' => true,
    		'query_var' => true,
    		'rewrite' => true,
    		'capability_type' => 'post',
    		'hierarchical' => false,
    		'menu_position' => null
    	//register what we just set up above
    	register_post_type('movie', $args);

    Which sets up the Movie post type in the Admin UI but does not create or display the Post Tags section.

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Custom Post Type with Tags’ is closed to new replies.