Hi there,
I need help with something I don’t understand.
I’ve got a Page with the name “Tarifs” and the slug is mydomain.com/tarifs
I’ve got a few CPT with these structure :
city1/tarifs
city2/tarifs
city3/tarifs…
The problem is my cpt slug are not :
mydomain.com/city1/tarifs
but mydomain.com/city1/tarifs-1 (and same thing for city2, city3…)
And one more thing, very problematic, is everytime I update my CPT the slug add -1 until 5 times, like this
mydomain.com/city1/tarifs-1-1-1-1-1
Temporarily I commented : add_filter( ‘wp_unique_post_slug’, array( $this, ‘fix_slug’ ), 100, 6 );
and it works but I would prefer a real Dev solution 😉
Thanks for your help
Regards