Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't getting same postname slug for multiple custom Post Type

I have 2 Custom Post Type(Our Works and Case Study) in a WordPress site. If I add same postname(Pepsi) at my 2 Custom Post Type(Our Works and Case Study) the permalink will show given below:

1) www.example.com/our-works/pepsi/

2) www.example.com/case-study/pepsi-2/

But It should be like:

1) www.example.com/our-works/pepsi/

2) www.example.com/case-study/pepsi/

like image 972
Finoy Francis Avatar asked Nov 27 '25 05:11

Finoy Francis


1 Answers

After searching for hours... I finally figured it out. Posting this for everyone who might encounter the same issue.

I have got 2 solutions:

like image 146
Finoy Francis Avatar answered Dec 02 '25 05:12

Finoy Francis



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!