Support » How-To and Troubleshooting » [Resolved] post type not supporting tags

[Resolved] post type not supporting tags

  • I would like the site’s default tags to show up in this custom post type. Any suggestions on why this is not working? do I need to do some kind of register function? am I missing a step?

    // adding a custom post type for news
    add_action('init', 'news_register');
    	$labels = array(
    			'name' => _x('News', 'post type general name'),
    			'singular_name' => _x('News', 'post type singular name'),
    			'add_new' => _x('Add New', 'News'),
    			'add_new_item' => __('Add New News'),
    			'edit_item' => __('Edit News'),
    			'new_item' => __('New News'),
    			'view_item' => __('View News'),
    			'search_items' => __('Search News'),
    			'not_found' =>  __('No news found'),
    			'not_found_in_trash' => __('No news found in the Trash'),
    			'parent_item_colon' => '',
    			'parent' => __( 'Parent News' ),
    			'public' => true
    		$args = array(
    				'labels' => $labels,
    				'public' => true,
    				'publicly_queryable' => true,
    				'show_ui' => true,
    				'query_var' => true,
    				'has_archive' => true,
    				'rewrite' => array('slug' => 'news'),
    				'capability_type' => 'post',
    				'menu_position' => null,
    				'supports' => array('title','editor','author','excerpt','thumbnail'),
    				'taxonomies' => array('post_tag')
    		register_post_type( 'news_listing' , $args );

    If it makes a difference any custom taxonomies I have are registered like so, so I can use them across multiple post types:

    	      'hierarchical' => false,
    	      'labels' => $labels,
    	      'show_ui' => true,
    	      'update_count_callback' => '_update_post_term_count',
    	      'query_var' => true,
    	      'rewrite' => array( 'slug' => 'location' ),
    	      'single_value' => true

    Maybe I have to do something similar for just default tags?


Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] post type not supporting tags’ is closed to new replies.