Hello. Such a problem, created a custom type of records (products) and in it created a custom taxonomy (products-categories) and one category (electronic). If you create a custom record of this category, then the link to it is obtained in the form of Home / CPT / Single Post
. How to achieve the result such as in standard entries - Home / Taxonomy / Term / Single Post
? Because of this problem bread crumbs do not work properly. After all, if you go from a page with categories (term) to a page with one product (single post type), then bread crumbs will show me the way as home / post type / single post
.
Update
Here is the registration of CPT and Taxonomy to it, maybe I missed something?
function true_register_post_type_init_products() { ... $args = array( 'labels' => $labels, 'publicly_queryable' => true, 'show_in_menu' => true, 'query_var' => true, 'public' => true, 'show_ui' => true, 'has_archive' => true, 'menu_position' => 20, 'supports' => array( 'title', 'editor', 'thumbnail'), 'rewrite' => array( 'slug' => 'products/products-categories/%products-categories%' ) ); register_post_type('products', $args); flush_rewrite_rules(); } function add_new_taxonomies_products() { register_taxonomy('products-categories', array('products'), array( 'hierarchical' => true, 'public' => true, 'show_in_nav_menus' => true, 'show_ui' => true, 'show_tagcloud' => true, 'update_count_callback' => '_update_post_term_count', 'query_var' => true, 'rewrite' => array( 'hierarchical' => true ), ) ); }
permalink_epmask
parameter to change the template link to the post: shibashake.com/wordpress-theme/custom-post-type-permalinks - Ponio