Question 1 Permalink structure
I trying to implement the right url/permalink structure for my site, but I can’t get it to work.
I have the following setup:
Custom post type: training
register_post_type( 'training', array( 'labels' => array( 'name' => __( 'Trainingen' ), 'singular_name' => __( 'Training' ), 'all_items' => __( 'Alle trainingen' ), 'view_item' => __( 'Bekijk training' ), 'add_new_item' => __( 'Nieuwe training' ), 'add_new' => __( 'Nieuwe training' ) ), 'public' => true, 'has_archive' => true, 'hierarchical' => false, 'rewrite' => array('slug' => 'our-training', 'with_front' => false), 'show_in_rest' => true ) );
**Custom taxonomy : training-category**
$args = array( "label" => ( "training category"), "labels" => $labels, "rewrite" => array( 'slug' => 'training-category', 'with_front' => true, ), "show_admin_column" => true, "hierarchical" => false, "has_archive" => true, "show_ui" => true ); register_taxonomy( "training_category", array( "event", "post", "training", "employee"), $args );
The permalink structure I want to establish:
our-training/training-category-1/training-name-1 our-training/training-category-2/training-name-2 our-training/training-category-1/training-name-3
what I do get is:
our-training/training-name-1 our-training/training-name-2 our-training/training-name-3
So the custom taxonomy is not inserted correctly in the permalink.
(I am also using Yoast breadcrumbs and have set the taxonomy to show for the training cpt to: training-category (my custom tax).)
Any tips on how I can get the desired permalink structure?
Question 2 – Redirect
Secondly I use facetwp for filtering so I need to redirect the category archive to a facetwp archive page.
Redirect I want to establish (simplyfied):
must redirect to:
How can I do this the best way?
Any pointers in the right direction will be highly appreciated!