I am trying to:
Rename a slug of a custom post type, I accidently wrote the slug with a typo,
And I noticed it just now (after creating post fields and posts).
After I renamed it to remove the typo,
All data was gone, all posts and post fields.
Once I've renamed it back to the slug with the typo, all the data was restored.
But I'm still interested in fixing the typo, so how can I do that?
Thanks.
Hi, you should be able to rename the custom post type slug without losing data. My guess is that there is a setting in WPML that is causing problems here. Did you translate the new slug into all languages? As a test, can you temporarily deactivate WPML plugins and try again?
I indeed use WPML, as the CPT is being translated.
In order to keep it working, what is the needed change I'm required to do in WPML translate?
Unfortunately I cannot deactivate the WPML plugin :/
Usually you can translate the slug in String Translation, assuming you have enabled Custom Post Slug translation in WPML settings. You can find more information about translating custom post type slugs in the WPML documentation:
https://wpml.org/documentation/getting-started-guide/translating-page-slugs/
I attached a screenshot,
As you can see it's not translated.
I'm trying to understand what am I doing wrong...
It should be translated? I never translated it as I found no use for that, I wanted to keep the 'laurate' slug same in English for all the translated languages.
Just to make sure, when I change the Slug in Toolset Types,
It makes all the posts to disappear, also in the original language, so I'm not sure how it's related to WPML.
Would be glad to have your assistance.
It should be translated? I never translated it as I found no use for that, I wanted to keep the 'laurate' slug same in English for all the translated languages.
Yes, if you want to use the same "laurate" slug in all languages, you should click "translations" here and add "laurate" in all languages.
Ok, and once I do that, I will be able to change the slug without all the data to disappear?
Ok, and once I do that, I will be able to change the slug without all the data to disappear?
As I said before, you should be able to rename the slug without losing data. If that is not the case, then there must be something else going on. If I could log into your wp-admin area and create a clone of your site, I can take a closer look. If that's okay with you, please provide login credentials in the private reply fields here.
Okay I updated the slug to be "laureate" instead of "laurate" in Toolset > Post Types. Then I saved the site Permalinks in Settings > Permalinks. Next I went to the (English) Laureates list in wp-admin: hidden link. From here, I updated the Hebrew translation of all Laureate posts to be sure the new slug was applied correctly in both languages.
Here are two of those items:
hidden link
hidden link
It appears the data was preserved, including the Laurate Fields, the Content Template assignment, the featured image, Awards, Countries, Alphabets, and Competitions. Can you check and confirm?
The posts have disappeared from here:
hidden link
This is a view based on the custom post type.
Maybe I need to do something on the view to "refresh" it?
Can you please check?
Edit the View and re-select the post type at the top of the editor, then resave the View.