WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was trying to remove portfolio-view from url and followed instructions to remove its name from highlighted section. This works but has left me with 'portfolio' now even though field is blank. What is wrong with this code or need changing in breadcrumbs please? It is now grabbing 'portfolio' from somewhere and i want this hidden in url.

I'm trying to get: http://www.sitename.com/post instead of http//www.sitename.com/portfolio/post.

/* Portfolio */

 function my_post_type_portfolio() {

 register_post_type( 'portfolio',


 'label' => __('Portfolio'),

 'singular_label' => __('Porfolio Item', 'theme'),

 '_builtin' => false,

 'public' => true,

 'show_ui' => true,

 'show_in_nav_menus' => true,

 'capability_type' => 'page',

 'menu_icon' => get_template_directory_uri() . '/includes/images/icon_portfolio.png',

**'rewrite' => array(
 'slug' => ' ',
 'with_front' =>false,**

 'supports' => array(







 register_taxonomy('portfoliocat', 'portfolio', array('hierarchical' => true, 'label' => 'Portfolio Categories', 'singular_name' => 'Category', "rewrite" => true, "query_var" => true));

add_action('init', 'my_post_type_portfolio'); 

Breadcrumb setting is: <a title="Go to %title%." href="%link%">%htitle%</a>

Permalinks: /%postname%/

share|improve this question
What plug-in are you using for your breadcrumbs? Breadcrumb NavXT? – Joseph Leedy Aug 31 '12 at 12:24
Yes using Breadcrumb NavXT – James Hughes Aug 31 '12 at 13:34
Just installed a plug-in 'remove custom post types' and that has solved the problem. don't know how it works, but it works. perfect url's now – James Hughes Aug 31 '12 at 13:35

You could try this plugin I wrote: https://github.com/interconnectit/custom-post-type-permalinks

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.