Skip Navigation

[Resolved] Custom Post no longer editable

This support ticket is created 2 years, 1 month 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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 3 replies, has 3 voices.

Last updated by Shane 2 years, 1 month ago.

Assisted by: Shane.

Author
Posts
#2312065

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

#2312093

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

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.

#2312251

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.

#2312365

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Kristof,

Unfortunately it is not possible to disable the single posts while have the archive active through the wordpress setting.

This will need to be achieved using some custom code to redirect the posts to your homepage or archive.

I was able to find the article below which should be able to help you with this.
hidden link

Please let me know if this helps.
Thanks,
Shane

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.