How to enable Gutenberg editor with custom post type?

How to enable Gutenberg editor with custom post type?

The above code will add the Project CPT and it’s will look like the below screenshot. As you can see, the default editor is the Classic Editor instead of the Gutenberg. The previous section added a Project CPT to WordPress and the CPT uses the Classic Editor instead of the Gutenberg.

Is the Gutenberg editor available in WordPress 5.0?

Since WordPress custom post types are almost everywhere, the unavailability of Gutenberg editor is something that the community has been talking about since the release of WordPress 5.0. This means that if you have CPT on your WordPress 5.x website, you will see the dear old Classic Editor when you create or edit a CPT.

How to create custom post types in WordPress?

Start by registering a Gutenberg WordPress custom type. The process is fairly easy and involves adding the following the code snippet. Once the snippet in place, the custom post type has been registered. However, in a surprising twist, when you try to create or edit a custom post type, you will still see the old Classic editor.

When to avoid registering blocks in Gutenberg editor?

Registering plenty of blocks in the Gutenberg editor can bog down the user experience. Then, it is a good practice to avoid registering blocks whenever they are not needed, such as when creating a custom block that needs be accessed for a specific custom post type only.

How do I create a new WordPress page with Gutenberg?

Let’s review the Gutenberg block editor by setting up a new page (or post). Start with the WordPress menu on the left side of the screen. If you want to create a new web page, hover over “Pages” and select “Add New”. If you want to create a new blog post, hover over “Posts” and select “Add New”.

Where do I find custom fields in Gutenberg?

First, click the three dots on the top left of the Gutenberg editor, and select “Options” as shown here: In the following screen, enable the checkbox for “Custom Fields” like this: The screen will refresh, and you’ll now see the familiar “custom fields” dialogue below the text editor:

How can I change the alignment of my paragraph in Gutenberg?

To customize the style of your paragraph, use the toolbar that appears just above it. With most Gutenberg blocks, you’ll have the ability to change the alignment of the content inside the block: The left is the default. You may also choose to center-align or right-align your content.

Can a WordPress page have categories and tags?

Note that WordPress Pages don’t use categories and tags by default. Pages are generally meant to be at the top-level, and can use page hierarchy to “categorize” them. If you’d like to add categories and tags to your pages, you can use this simple WordPress Plugin, Pages with Category and Tag.