• Resolved samius022

    (@samius022)


    Why the default editor is not the block editor?

    I want to add a new portfolio, but the editor is the classic editor

    how to switch?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Support milton9220

    (@milton9220)

    Hi

    /**
    Enable block editor.
    *
    @param array $args Post Type Args.
    @param string $post_type Post Type.
    @return array
    */
    function tlp_portfolio_post_type_args( $args, $post_type ) {
    global $TLPportfolio;
    if ( $post_type !== $TLPportfolio->post_type ) {
    return $args;
    }
    $args['show_in_rest'] = true;
    return $args;
    }
    add_filter( 'register_post_type_args', 'tlp_portfolio_post_type_args', 10, 2 );

    Use those code in your child theme.

    Thank you

Viewing 1 replies (of 1 total)
  • The topic ‘Why the default editor is not the block editor’ is closed to new replies.