jefsev
Forum Replies Created
-
could you try to use:
'rewrite' => array('slug' => 'catalogus', 'with_front' => true),
instead of:
'rewrite' => array('slug' => '/catalogus/', 'with_front' => false),
This fixed it for me, but this ‘rewrite’ => array(‘slug’ => ”, ‘with_front’ => false), or ‘rewrite’ => array(‘slug’ => ‘/’, ‘with_front’ => false), still doesnt work. But that’s fine. Its solved for me, the above way is probably not the right way anyhow.
Thanks for your fast support.
Hey Marciej,
Thanks for your fast response. I can confirm that i added a rewrite rule in a taxanomy of a custom post type as follows:
add_action('init', function() { $product_labels = [ 'name' => 'Producten', 'singular_name' => 'Product', 'add_new' => 'Nieuwe product', 'edit_item' => 'Product aanpassen' ]; register_post_type( 'producten', [ 'labels' => $product_labels, 'public' => true, 'has_archive' => false, 'menu_icon' => 'dashicons-media-document', 'supports' => array( 'title','thumbnail' ), ]); register_taxonomy( 'kleur', 'producten', array( 'hierarchical' => true, 'label' => 'Kleur', 'query_var' => true, ) ); register_taxonomy( 'merk', 'producten', array( 'hierarchical' => true, 'label' => 'Merk', 'query_var' => true, ) ); register_taxonomy( 'soort', 'producten', array( 'hierarchical' => true, 'label' => 'Soort vloer', 'query_var' => true, 'rewrite' => array('slug' => '/', 'with_front' => false), ) ); });
When i do delete the rewrite rule the pages work again which is good. But i would like to keep my rewrite rule because i need it that way. And it works fine normally with pages but after installing and deactivating the plugin it doesnt any more.
And furthermore when i do change it to something like:
register_taxonomy( 'soort', 'producten', array( 'hierarchical' => true, 'label' => 'Soort vloer', 'query_var' => true, 'rewrite' => array('slug' => '/catalogus/', 'with_front' => false), ) );
It still doesnt work. How can i send you the settings?