Support » Developing with WordPress » custom post type with Gutenberg gives blank page and 403 error in console

  • Resolved ewd910


    Hi, I’ve created a custom post type that I would like to have the Gutenberg block editor enabled for, as well as to define custom capabilities to assign to users.
    Everything works if the ‘capability_type’ is set to ‘page’, or if ‘editor’ is removed from the ‘supports’ array. However, if the editor is enabled, my capability type is set to ‘custom_post_type’ and my capabilities array is set, even if the correct permissions are given to my role (administrator) I get a blank page, with this in the console-
    GET http://site_url/wp-json/wp/v2/custom_post_type/3653?context=edit&_locale=user 403 (Forbidden)

    Any ideas on what this could be? Thanks

Viewing 1 replies (of 1 total)
  • Thread Starter ewd910


    Figured it out just after posting this, I had to remove

    'edit_post' => 'edit_custom_post_type',
    'delete_post' => 'delete_custom_post_type',
    'read_post' => 'read_custom_post_type',

    from my capabilities array.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.