how can i setup same post slug for different categories. i mean

www.example.com/author/physics www.example.com/subject/physics

but in wordpress it shows

www.example.com/author/physics www.example.com/subject/physics-2

how to solve this issue with code or plugin.

1 Answer 1


I think you can check this code or download and install this plugin: https://github.com/GaryJones/allow-duplicate-slugs I hope it help you much.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.