Stand with Ukraine. Fight for freedom and democracy

Donate
Troubleshooting //
Need to Restore the Broken Posts URLs After Rewriting the CPT Slug

Need to Restore the Broken Posts URLs After Rewriting the CPT Slug

Question

I had a custom post type and about 15 posts within it. I tried to change the slug of this CPT but this broke my posts

Answer

NOTE!
Be aware if you delete the post type, don’t use the same slug in the new one. If you want to use the same slug twice, ensure to clean the database beforehand.

A #1 rule to follow: when you want to rewrite the CPT slug, make sure to resave the permalinks.

Go to JetEngine > Post Types and click on the post type you would like to edit. 

In the General Settings tab, you are at liberty to change the Post Type Name only. The Post Type Slug should remain untouched.

CPT general settings

Open the Advanced Settings tab and scroll down to the Rewrite Slug control. Type in the slug you want and press the “Update Post Type” button.

Proceed to resave the permalinks.

Follow the Settings > Permalinks pathway, scroll down the page, and press the “Save changes” button one more time. 

resaving the permalinks

Was this article helpful?
YesNo
Still need help?
Submit a request