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',
array(
'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(
'title',
'editor',
'thumbnail',
'excerpt',
'custom-fields',
'comments')
)
);
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%/