Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gutenberg Editor In the Custom Post Types #49

Open
robmcclel opened this issue Sep 29, 2019 · 0 comments
Open

Gutenberg Editor In the Custom Post Types #49

robmcclel opened this issue Sep 29, 2019 · 0 comments

Comments

@robmcclel
Copy link

Is your feature request related to a problem? Please describe.
I'd like to have an easier way to include different content into the book description area (audio samples, galleries, reader reviews/testimonials, etc) and feel that the many new Gutenberg block options for these things would be much easier than the traditional "classic" methods.

Describe the solution you'd like
I'd like to know a way to enable the Gutenberg editor in the Author Pro Custom Post Type.

Describe alternatives you've considered
I've consulted a few methods on the web on how to activate the Gutenberg editor for custom post types, but their method/description doesn't seem to match how the custom post type in the plugin is constructed. Here is what I found as a sample:

/*Register WordPress Gutenberg CPT */ function cw_post_type() { register_post_type( 'portfolio', // WordPress CPT Options Start array( 'labels' => array( 'name' => __( 'Portfolio' ), 'singular_name' => __( 'Portfolio' ) ), 'has_archive' => true, 'public' => true, 'rewrite' => array('slug' => 'portfolio'), 'show_in_rest' => true, 'supports' => array('editor') ) ); }

This snippet is supposed to go into the theme's functions .php file, but considering Author Pro is a plugin, I wasn't sure where would be the best place to insert it. Also, if the full insertion is necessary. The key for activating the Gutenberg editor screen is this smaller part:

'show_in_rest' => true, 'supports' => array('editor')

I would appreciate it if the plugin designer could provide some insight into how they would enable the Gutenberg editor into the various parts of this plugin (book, library page, series page, author page, tag page, etc). My clients have been wanting to put a lot more content into these areas than basic text, and Gutenberg capability would significantly decrease the level of effort to do so.

Thank you and any assistance is much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant