I created a CPT with the slug "referentie". I had already created 6 or 7 posts, but then I had to rename the slug to "referenties" to match the old website.
This caused all created posts to disappear. I fixed this by disabling and enabling the WPML plugin, but I can no longer edit the posts and when trying to edit the translation, I get a server error
The posts are saved in wp_posts with a post_type of "referentie".
If you change the post type so that it uses a slug of "referenties" then the old posts are still in the database, but WordPress doesn't know what they are (because there is no such post type as "referentie").
To "recover" the posts you need to update wp_posts and change the post_type entry to the new "referenties".
Then WordPress will recognise them.
Use a tool such as phpMyAdmin to update the entries in wp_posts.
Hi Nigel,
It seems the problem fixed itself, I had a look at the database and the post type was already 'referenties' for all these posts. And indeed, when I went back to the WP admin, I could edit each original post and any translations.
However, I have another little question. I don't want the individual posts be visible from the frontend, but I do want to keep the post archive (created with Elementor).
When I deselect 'publicly_queryable' than the archive cannot be accessed and it redirects to the homepage. When I deselect 'has-archive', then the archive shows a 404.