I have Three Custom post Types and one Custom Taxonomy and some pages. The Custom taxonomy is register with one of the post type. The problem is When the default Permalink is enable it works for all pages, custom post types and taxonomies. But when the "Post name" or any other permalink enable it breaks the pages structure, and the rest of links are working fine.
After Register the post types and taxonomies i use flush_rewrite_rules() but its not working.
Please help me in this situation.
add_action("after_setup_theme","rg_menus");
function rg_menus(){
register_nav_menus(array(
'header'=> "Primary Menu",
'footer'=> "Footer Menu",
'header_menu'=>'Top Menu'
));
add_theme_support("post-thumbnails");
add_image_size("home_header",1517,516,true);
add_image_size("page_headers",1517,259,true);
create_product();
create_product_category();
}
/*===============================*/
/* P-Riopel Product */
function create_product(){
register_post_type('priopel_products', array( 'label' => 'PRiopel Products','description' => '','public' => true,'show_ui' => true,'show_in_menu' => true,'capability_type' => 'post','hierarchical' => false,'rewrite' => array('slug' => 'product'),'query_var' => true,'has_archive' => true,'exclude_from_search' => false,'supports' => array('title','editor','excerpt','trackbacks','custom-fields','thumbnail','author','page-attributes',),'taxonomies' => array('priopel_cat',),'labels' => array (
'name' => 'PRiopel Products',
'singular_name' => 'PRiopel Product',
'menu_name' => 'PRiopel Products',
'add_new' => 'Add Product',
'add_new_item' => 'Add New Product',
'edit' => 'Edit',
'edit_item' => 'Edit Product',
'new_item' => 'New Product',
'view' => 'View Product',
'view_item' => 'View Product',
'search_items' => 'Search Products',
'not_found' => 'No Products Found',
'not_found_in_trash' => 'No Products Found in Trash',
'parent' => 'Parent Product',
),) );
}
/*===============================*/
/* P-Riopel Product Category */
function create_product_category(){
register_taxonomy('priopel_cat',
array ('priopel_products',
),array( 'hierarchical' => true,
'public' => true,
'label' => 'Categories',
'show_ui' => true,
'query_var' => true,
'rewrite' => array('slug' => '','with_front' => true,'hierarchical'=>true),
'singular_label' => 'Category') );
}