title: Change custom post-type rewrite
body: <p>I have a custom theme that uses custom post types for my portfolio <em>e.g. mysite.com/portfolio/</em>. Once I click on a specific portfolio item the URL changes to <em>mysite.com/<strong>portfolio-type</strong>/name/</em> </p>
  
  <p>What's the easiest way to change the <strong>portfolio-type URL</strong> in the middle to another value e.g "showcase"?</p>
  
  <p><strong>Here the custom post type part of my functions.php:</strong></p>
  
  <pre><code>    // CUSTOM POST TYPES
  
      function justins_custom_post_types() {
  
  
          // Portfolio
  
          $labels_portfolio = array(
              'add_new' =&gt; 'Add New', 'portfolio-type',
              'add_new_item' =&gt; 'Add New Portfolio Post',
              'edit_item' =&gt; 'Edit Portfolio Post',
              'menu_name' =&gt; 'Portfolio',
              'name' =&gt; 'Portfolio', 'post type general name',
              'new_item' =&gt; 'New Portfolio Post',
              'not_found' =&gt;  'No portfolio posts found',
              'not_found_in_trash' =&gt; 'No portfolio posts found in Trash', 
              'parent_item_colon' =&gt; '',
              'singular_name' =&gt; 'Portfolio Post', 'post type singular name',
              'search_items' =&gt; 'Search Portfolio Posts',
              'view_item' =&gt; 'View Portfolio Post',
          );
          $args_portfolio = array(
              'capability_type' =&gt; 'post',
              'has_archive' =&gt; true, 
              'hierarchical' =&gt; true,
              'labels' =&gt; $labels_portfolio,
              'menu_position' =&gt; 4,
              'public' =&gt; true,
              'publicly_queryable' =&gt; true,
              'query_var' =&gt; true,
              'show_in_menu' =&gt; true, 
              'show_ui' =&gt; true, 
              'supports' =&gt; array( 'comments', 'editor', 'excerpt', 'thumbnail', 'title' ),
              'singular_label' =&gt; 'Portfolio',
          );
          register_post_type( 'portfolio-type', $args_portfolio );
  
  
      }
  
      add_action( 'init', 'justins_custom_post_types' );
  
  
      // CUSTOM TAXONOMIES
  
      function justins_custom_taxonomies() {
  
  
          // Portfolio Categories 
  
          $labels = array(
              'add_new_item' =&gt; 'Add New Category',
              'all_items' =&gt; 'All Categories' ,
              'edit_item' =&gt; 'Edit Category' , 
              'name' =&gt; 'Portfolio Categories', 'taxonomy general name' ,
              'new_item_name' =&gt; 'New Genre Category' ,
              'menu_name' =&gt; 'Categories' ,
              'parent_item' =&gt; 'Parent Category' ,
              'parent_item_colon' =&gt; 'Parent Category:',
              'singular_name' =&gt; 'Portfolio Category', 'taxonomy singular name' ,
              'search_items' =&gt;  'Search Categories' ,
              'update_item' =&gt; 'Update Category' ,
          );
          register_taxonomy( 'portfolio-category', array( 'portfolio-type' ), array(
              'hierarchical' =&gt; true,
              'labels' =&gt; $labels,
              'query_var' =&gt; true,
              'rewrite' =&gt; array( 'slug' =&gt; 'portfolio-type/category' ),
              'show_ui' =&gt; true,
          ));
  
  
          // Portfolio Tags   
  
          $labels = array(
              'add_new_item' =&gt; 'Add New Tag' ,
              'all_items' =&gt; 'All Tags' ,
              'edit_item' =&gt; 'Edit Tag' , 
              'menu_name' =&gt; 'Portfolio Tags' ,
              'name' =&gt; 'Portfolio Tags', 'taxonomy general name' ,
              'new_item_name' =&gt; 'New Genre Tag' ,
              'parent_item' =&gt; 'Parent Tag' ,
              'parent_item_colon' =&gt; 'Parent Tag:' ,
              'singular_name' =&gt;  'Portfolio Tag', 'taxonomy singular name' ,
              'search_items' =&gt;   'Search Tags' ,
              'update_item' =&gt; 'Update Tag' ,
          );
          register_taxonomy( 'portfolio-tags', array( 'portfolio-type' ), array(
              'hierarchical' =&gt; true,
              'labels' =&gt; $labels,
              'query_var' =&gt; true,
              'rewrite' =&gt; array( 'slug' =&gt; 'portfolio-type/tag' ),
              'show_ui' =&gt; true,
          ));
  </code></pre>
  
  <p>}</p>
  
  <p><strong>Reference URL to the theme's portfolio section:</strong> <a href="http://html.orange-idea.com/commander/4-columns-portfolio/" rel="nofollow">http://html.orange-idea.com/commander/4-columns-portfolio/</a> <em>(No problems with this one)</em></p>
  
  <p><strong>Single item:</strong> <a href="http://html.orange-idea.com/commander/portfolio-type/summer-time/" rel="nofollow">http://html.orange-idea.com/commander/portfolio-type/summer-time/</a> <em>(/portfolio-type/ added in URL)</em></p>
  
  <p>I would also like to mention that the theme consists of a <strong>single-portfolio-type.php</strong> file.</p>
  
  <p>Thank you.</p>