Skip Navigation

[Resolved] Cannot use Block Editor With Custom Post Types Without Has Archive Ticked

This support ticket is created 4 years, 11 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: Asia/Hong_Kong (GMT+08:00)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 4 years, 11 months ago.

Assisted by: Luo Yang.

Author
Posts
#1423205

There is an issue with using toolset and Gutenberg blocks when you create a custom post type and do not have the HAS_ARCHIVE check box ticked.

In order to allow my client the ability to modify their pages themselves (im not using a page builder) I have created a page which uses the same slug as what the archive or a custom post type would. The issue is that for some reason I am unable to update either this page, nor the posts within this post type unless I select the classic editor and disabled Gutenberg on these pages / post types.

On the above site go to /fitted-bathrooms/ which is a page. My custom posts (all options listed under this on the menu) are created with types.

I am unable to edit any of these posts, nor the page fitted bathrooms (it will allow editing, yet does not save anything.

#1424141

Hello,

I have tried it with below steps in a fresh WordPress installation + the latest version of Toolset plugins
1) Create a custom post types "my-cpt" with slug "my-cpt", disable option "has_archive"
2) Create some "my-cpt" posts with block editor
3) Create a page with same slug "my-cpt" with block editor
4) edit those "my-cpt" posts and "my-cpt" page again, it works fine.
So there might be other compatibility issues in your website, please try these:
deactivate all other plugins, and switch to wordpress default theme 2020, deactivate all custom PHP/JS code snippets, and test again

And it is not recommended to use same slug for custom post type and page, it will conducts other unexpected result. You can edit your custom post type, try to save it, you should be able to see the message:
You cannot use this slug because it is already used or a reserved word. Please choose a different slug.

In your case, I suggest you try these:
1) Enable option "has_archive" in your custom post type
2) Follow our document to customize the custom post type archive page.
https://toolset.com/documentation/getting-started-with-toolset/customize-post-archives/