Title: multiple post type registration
Last modified: August 30, 2016

---

# multiple post type registration

 *  [_natty_](https://wordpress.org/support/users/_natty_/)
 * (@_natty_)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/multiple-post-type-registration/)
 * Hi to all
    I try many different way to register multiple post type, one works,
   the second no and I can’t spot why!
 * My last test was about:
    – `require_once('portfolio-type.php');` on functions.
   php file
 * -in `portfolio-type.php` I put the double registration like that:
 *     ```
       if ( function_exists( 'add_theme_support' ) ) {
           add_theme_support( 'post-thumbnails' );
           set_post_thumbnail_size( 280, 210, true ); // Normal post thumbnails
           add_image_size( 'screen-shot', 720, 540 ); // Full size screen
       }
   
       add_action('init', 'genera_post_type'); 
   
       function genera_post_type(){
   
       	portfolio_register();
   
       }
   
       function portfolio_register() {
           $args = array(
               'label' => __('Portfolio'),
               'singular_label' => __('Project'),
               'public' => true,
       	'has_archive'=>true,
               'show_ui' => true,
               'capability_type' => 'post',
               'hierarchical' => false,
       	'show_in_menu' => true,
       	'show_in_nav_menus'   => true,
               'rewrite' => true,
               'supports' => array('title', 'editor', 'thumbnail')
              );  
   
        $args2 = array(
               'label' =>'Ideas',
               'singular_label' => 'Idea',
               'public' => true,
       	'has_archive'=>true,
               'show_ui' => true,
               'capability_type' => 'post',
               'hierarchical' => false,
       	'show_in_menu' => true,
       	'show_in_nav_menus'   => true,
               'rewrite' => true,
               'supports' => array('title', 'editor', 'thumbnail')
              );  
   
           register_post_type( 'idea' , $args2 );
           register_post_type( 'portfolio' , $args );
       }
       ```
   
 * For portfolio I got no problem, everything is correct.
    For Idea post type everything
   works but when I try to visit a generated post I always see a 404 error of page
   not found. I try to add single-idea.php or not, but same result in both case,
   I try to register the post in different context but same result… How can I solve
   this? Many thanks in advance

Viewing 1 replies (of 1 total)

 *  [mrjhon01](https://wordpress.org/support/users/mrjhon01/)
 * (@mrjhon01)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/multiple-post-type-registration/#post-6805882)
 * Try to re-save your permalink in order to update the links for the new post_type;

Viewing 1 replies (of 1 total)

The topic ‘multiple post type registration’ is closed to new replies.

## Tags

 * [register_post_type](https://wordpress.org/support/topic-tag/register_post_type/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [mrjhon01](https://wordpress.org/support/users/mrjhon01/)
 * Last activity: [10 years, 5 months ago](https://wordpress.org/support/topic/multiple-post-type-registration/#post-6805882)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
