Gutenberg + Custom Post Type + Custom Role = No Featured Images?
-
I’m almost 100% sure I’m doing this right and I think it’s a bug in WordPress, but before I open a tracker, I was hoping someone else had an idea.
I created a custom post type, enabled show_in_rest, with supports set to thumbnail and map_meta_cap enabled. I created a custom role that has all of the correct capabilities to edit my custom post type and added upload_files so they can upload images. Unfortunately, the Block Editor doesn’t let the custom role see the image (loaded via REST) or even see the Feature Image panel. There appears to be a REST request to /wp-json/wp/v2/themes that fails because the custom role doesn’t have edit_posts.
It works for Administrators and Editors. If I grant edit_posts to my custom role, it works for the custom role also. But I don’t want the custom role to edit normal posts, only my custom posts.
Thank you for taking the time to read this. Thank you in advance for any help you might be able to provide. I’m about to give up on this functionality.
- The topic ‘Gutenberg + Custom Post Type + Custom Role = No Featured Images?’ is closed to new replies.