Registered a custom type:
add_action( 'init', 'exercises' ); function exercises() { $labels = array( 'name' => 'Π£ΠΏΡΠ°ΠΆΠ½Π΅Π½ΠΈΡ', 'singular_name' => 'Π£ΠΏΡΠ°ΠΆΠ½Π΅Π½ΠΈΠ΅', 'add_new' => 'ΠΠΎΠ±Π°Π²ΠΈΡΡ ΡΠΏΡΠ°ΠΆΠ½Π΅Π½ΠΈΠ΅', 'add_new_item' => 'ΠΠΎΠ±Π°Π²ΠΈΡΡ Π½ΠΎΠ²ΠΎΠ΅ ΡΠΏΡΠ°ΠΆΠ½Π΅Π½ΠΈΠ΅', 'edit_item' => 'Π Π΅Π΄Π°ΠΊΡΠΈΡΠΎΠ²Π°ΡΡ ΡΠΏΡΠ°ΠΆΠ½Π΅Π½ΠΈΠ΅', 'new_item' => 'ΠΠΎΠ²ΠΎΠ΅ ΡΠΏΡΠ°ΠΆΠ½Π΅Π½ΠΈΠ΅', 'all_items' => 'ΠΡΠ΅ ΡΠΏΡΠ°ΠΆΠ½Π΅Π½ΠΈΡ', 'view_item' => 'ΠΡΠΊΡΡΡΡ ΡΠΏΡΠ°ΠΆΠ½Π΅Π½ΠΈΠ΅', 'search_items' => 'ΠΡΠΊΠ°ΡΡ ΡΠΏΡΠ°ΠΆΠ½Π΅Π½ΠΈΠ΅', 'not_found' => 'Π£ΠΏΡΠ°ΠΆΠ΅Π½Π΅Π½ΠΈΠ΅ Π½Π΅ Π½Π°ΠΉΠ΄Π΅Π½ΠΎ.', 'not_found_in_trash' => 'Π ΠΊΠΎΡΠ·ΠΈΠ½Π΅ Π½Π΅Ρ ΡΠΏΡΠ°ΠΆΠ½Π΅Π½ΠΈΠΉ.', 'menu_name' => 'Π£ΠΏΡΠ°ΠΆΠ½Π΅Π½ΠΈΡ' ); $args = array( 'labels' => $labels, 'public' => true, 'show_ui' => true, 'has_archive' => true, 'menu_icon' => 'dashicons-admin-page', 'menu_position' => 4, 'supports' => array( 'title', 'editor', 'comments'), 'taxonomies' => array( ), 'hierarchical' => true, ); register_post_type('exercises', $args); } Also registered taxonomy for categories:
add_action( 'init', 'add_category_exercises'); function add_category_exercises() { $labels = array( 'name' => 'Π ΡΠ±ΡΠΈΠΊΠΈ', 'singular_name' => 'Π ΡΠ±ΡΠΈΠΊΠ°', 'all_items' => 'ΠΡΠ΅ ΡΡΠ±ΡΠΈΠΊΠΈ', 'edit_item' => 'ΠΠ·ΠΌΠ΅Π½ΠΈΡΡ ΡΡΠ±ΡΠΈΠΊΡ', 'update_item' => 'ΠΠ·ΠΌΠ΅Π½ΠΈΡΡ ΡΡΠ±ΡΠΈΠΊΡ', 'add_new_item' => 'ΠΠΎΠ±Π°Π²ΠΈΡΡ Π½ΠΎΠ²ΡΡ ΡΡΠ±ΡΠΈΠΊΡ', 'new_item_name' => 'ΠΠΎΠ±Π°Π²ΠΈΡΡ Π½ΠΎΠ²ΡΡ ΡΡΠ±ΡΠΈΠΊΡ', 'menu_name' => 'Π ΡΠ±ΡΠΈΠΊΠΈ' ); register_taxonomy('cat_exercises', array('exercises'), array( 'hierarchical' => true, 'labels' => $labels, 'show_ui' => true, 'query_var' => true, 'rewrite' => array( 'slug' => 'exercises/muscle', 'with_front' => false, 'hierarchical' => true ) )); } So advised to do on the English stackoverflow. If arbitrary type of records work, then if you go to the taxonomy page returns 404 error.
That is, in theory should get such links:
site.com/exercises/example-post - the post link works, everything is fine.
site.com/exercises/muscle/press - link does not work, returns 404 error.
Question: why does not work and returns 404 error?
PS Update links made.
PS For @SeVlad Here is also an example of such an implementation: 