EDIT:
This is my custom post type code
function my_post_type_portfolio() {
register_post_type( 'portfolio',
array(
'label' => __('portfolio'),
'singular_label' => __('portfolio', 'theme1418'),
'_builtin' => false,
'public' => true,
'show_ui' => true,
'show_in_nav_menus' => true,
'hierarchical' => true,
'capability_type' => 'page',
'menu_icon' => get_template_directory_uri() . '/includes/images/icon_portfolio.png',
'rewrite' => array(
'slug' => 'portfolio',
'with_front' => FALSE,
),
'supports' => array(
'title',
'editor',
'thumbnail',
'excerpt',
'custom-fields',
'comments')
)
);
register_taxonomy('portfolio_category', 'portfolio', array('hierarchical' => true, 'label' => 'portfolio', 'singular_name' => 'portfolio', "rewrite" => false, "query_var" => true));
}
add_action('init', 'my_post_type_portfolio');