• The site is using multiple custom post types, which are registered in the exact same way. But post types are not showing up for all of them. Why does Insights work but not Research?

    function register_custom_post_types() {
    
            // Insights
    	$labels = array(
    		'name' => _x('Insights', 'post type general name'),
    		'singular_name' => _x('Insight', 'post type singular name'),
    		'add_new' => _x('Add New Insight', 'insight'),
    		'add_new_item' => __('Add New Insight'),
    		'edit_item' => __('Edit Insight'),
    		'new_item' => __('New Insight'),
    		'view_item' => __('View Insight'),
    		'search_items' => __('Search Insights'),
    		'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' => array('slug' => 'insights', 'with_front' => FALSE),
    		'capability_type' => 'post',
    		'hierarchical' => false,
    		'supports' => array('title','editor','author','thumbnail','post-formats'),
    		'has_archive' => true
    	); 
    
    	register_post_type( 'insights' , $args );
    
    	// Research
    	$labels = array(
    		'name' => _x('Research', 'post type general name'),
    		'singular_name' => _x('Research', 'post type singular name'),
    		'add_new' => _x('Add New Research', 'research'),
    		'add_new_item' => __('Add New Research'),
    		'edit_item' => __('Edit Research'),
    		'new_item' => __('New Research'),
    		'view_item' => __('View Research'),
    		'search_items' => __('Search Research'),
    		'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' => array('slug' => 'research', 'with_front' => FALSE),
    		'capability_type' => 'post',
    		'hierarchical' => false,
    		'supports' => array('title','editor','author','post-formats'),
    		'has_archive' => true
    	); 
    
    	register_post_type( 'research' , $args );
    }

The topic ‘Post type support for custom post types’ is closed to new replies.