0

I have a custom post type and want a custom user role (I named it subscriber_modified) (based on subscriber) to also have the ability to view and add reusable blocks as they are editing the content of a custom post type.

Users with the subscriber_modified role are able to edit the custom posts types (insert new blocks, add text to them, etc) as I intended but the users cannot access the reusable blocks.

I've tried adding the reusable blocks within custom post's template so that the reusable block automatically loads when the subscriber_modified user creates a new custom post. The reusable block does not display; instead a message stating "this block has been deleted or unavailable" displays for the subscriber_modified user. When an administrator creates or edits a custom post, the reusable block's content displays as intended. The reusable block also is not found when the subscriber_modified user search for the block in the block list; the reusable block does display in the list of available blocks.

The official roles and capabilities page on WordPress Support mentions "read Reusable Blocks" but it does not list the particular capability to be used.

I've already checked and this user role already does have the following granted (and these are all of the available capabilities listed that contain 'block' in them according to the members plugin):

publish_blocks
read_private_blocks
delete_blocks
delete_private_blocks
edit_private_blocks

EDIT: I also guessed and added a "read_reusable_blocks" capability to that user role; that did not make a difference; the user is still unable to view a reusable block.

1

As of now, there is no dedicated user capability to read a reusable block; it is not possible to customize the capabilities (reading, editing, deleting) exclusively for reusable blocks.

The capabilities are currently tied into in the capabilities of the post type post so the capabilities that you give to the post type 'post' will be used for reusable blocks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.