Hey @ralphonz,
With Gutenberg not being the most popular choice of WordPress users right now, we have choose to apply the classic editor to the custom post type proposals. However, below is some code that you can use to enable Gutenberg for your proposals.
This code should be placed in the functions.php file of your active theme or a custom plugin. This allows you to update WP Proposals without loosing any of your custom modifications.
// Add REST API support to WP Proposals post type.
add_filter( ‘register_post_type_args’, ‘wp_proposals_rest_post_type_args’, 10, 2 );
function wp_proposals_rest_post_type_args( $args, $post_type ) {
if ( ‘proposal’ === $post_type ) {
$args[‘show_in_rest’] = true;
}
return $args;
}
// Add REST API support to WP Proposals taxonomies.
add_filter( ‘register_taxonomy_args’, ‘wp_proposals_rest_taxonomy_args’, 10, 2 );
function wp_proposals_rest_taxonomy_args( $args, $taxonomy_name ) {
if ( ‘proposal_invoice’ === $taxonomy_name || ‘clients’ === $taxonomy_name || ‘proposal_status’ === $taxonomy_name ) {
$args[‘show_in_rest’] = true;
}
return $args;
}
Great thanks, I’ll try it out!
The above code makes perfect sense. I really feel like I should have been able to figure that out on my own! Thanks again.
-
This reply was modified 5 years, 2 months ago by
ralphonz.