• Resolved ralphonz

    (@ralphonz)


    Hey there,

    Does WP-Proposals work with the block editor (Gutenberg)? I can’t get it to use the block editor and just want to make sure I’ not missing something!

    I have the classic editor installed (for editing some other things on the site) and have enabled “Allow users to switch editors” in writing settings but don’t see an option to switch to the block editor in wp-proposals.

    Cheers

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author WP Codeus

    (@wpcodeus)

    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;
    }

    Thread Starter ralphonz

    (@ralphonz)

    Great thanks, I’ll try it out!

    Thread Starter ralphonz

    (@ralphonz)

    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 3 years, 11 months ago by ralphonz.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WordPress Block Editor’ is closed to new replies.