How to make custom fields in Gutenberg editor? Need Help

[ad_1]

Hi Dudes, here I am again.

I have used some plugins and codes to make the woocommerce product description in Gutenberg editor as the picutre below:

https://preview.redd.it/eu2s6tog1jkd1.png?width=1343&format=png&auto=webp&s=e23610250694d13ce0a7cc29bd4909e9300f29c7

It's really useful but here is the thing:

I added a custom field for product technical data, but it's classic editor( with plugin installed), I want to make it Gutenberg editor too.

https://preview.redd.it/5b1zod3s1jkd1.png?width=1361&format=png&auto=webp&s=5a30214f9ce72af282b63c66431ebf1714f16ff4

I youtubed this issue but found nothing, how could I possibly achieve that?

[ad_2]
3 Comments
  1. Here is the code I copied from the Youtuber to make the description gutenberged:

    // enable gutenberg for woocommerce

    function activate_gutenberg_product( $can_edit, $post_type ) {

    if ( $post_type == ‘product’ ) {

    $can_edit = true;

    }

    return $can_edit;

    }

    add_filter( ‘use_block_editor_for_post_type’, ‘activate_gutenberg_product’, 10, 2 );

    // enable taxonomy fields for woocommerce with gutenberg on

    function enable_taxonomy_rest( $args ) {

    $args[‘show_in_rest’] = true;

    return $args;

    }

    add_filter( ‘woocommerce_taxonomy_args_product_cat’, ‘enable_taxonomy_rest’ );

    add_filter( ‘woocommerce_taxonomy_args_product_tag’, ‘enable_taxonomy_rest’ );

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer