Skip Navigation

[Resolved] When changing the slug and post type name all disapare

This thread is resolved. Here is a description of the problem and solution.

Problem:
The user would like to change the slug of a custom post type when he does it, some posts disappear and the translations are not consistent.

Solution:
The best solution would be to export all posts and Translations with a plugin, change the custom post type slug, update the exported file, and import it again.

This support ticket is created 4 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

This topic contains 5 replies, has 2 voices.

Last updated by patrikK-3 4 years, 8 months ago.

Assisted by: Jamal.

Author
Posts
#1656835
1.jpg

IN Dashboard i go to the posttype i have called "Projects"
To be able to translate it in correct way i need to change this to "Projekt" (in swedish)
So WPML can then translate it to "projects" now i cant translate it because it thinkt "projects" is in swedish... cant change this under WPML settinge ether.

Now to the big issue.
When changing the slug and name to "Projekt" all items vannish.
I can see there is 33 items under published, but - i cant se them

If i rename it again to "Projects" they all come back...

So how can i change the slug afterwords ?

What i want to do is to have differnet slugs for each language.
I have Swedish as primary langage and English as secondary.
I was adding the posttype in swedish mode, but typed the slug in english.

#1656979

Hello and thank you for contacting the Toolset support.

I think this is a very special case and should be handled carefully. I'll suggest testing in a staging site before applying it to the live site.

First, let's get things working without WPML. Let's deactivate WPML and make all the Swedish posts work with the Swedish slug, then, activate WPML and translate the slug and posts.
You can also export your posts, then redefine your slug. Edit the exported data to use the new slug and import posts again.

I hope this helps. Let me know what you will get.

#1658459

Hi, thank you for the tips

i have exported all the projects with WordPress own export-function.
will this be good enough en keep all page-builder settings from WPBakery ?

So, you want me to deactivate the WPML and the rename the slug, and hopfully this will work ?
The thing is in database the "post type" is changed to correct slug, but still wont show up in the post type listings i wp-admin.

Deactivated WPML - changed Slug.
Swedish posts works with correct slug when re-activated WPML.
All post is now "swedish" so i think i need to re-assign them to english.

#1658549

Im so happy!
it worked ! Im all good to go! thanks alot for your help!

#1660053

Hello and my apologies for the late reply, I was on a sick leave yesterday.

That's awesome! I am glad I could help.
If you do not need any further assistance with this issue, please mark this ticket as resolved and open a new ticket for any other questions.

Best regards,
Jamal

#1662739

My issue is resolved now. Thank you!