Category: Gutenberg
-
Block Variation is Not (!==) Block Style
The Crucial Difference Most Developers Miss In the WordPress block ecosystem, confusion between block styles and block variations can lead to suboptimal implementations. Let’s clarify these concepts once and for…
-
Accelerate block theme development within Site Editor using create-block-theme 🚀
Did you know, the Site Editor automatically saves all the changes you make to templates or styles in the database? This feature comes in handy during the building process, allowing…
-
How to use block template parts in the classic theme?
Note: This feature is added in WordPress 6.1. Now, it is possible to create block-based template parts in classic themes and allows the same flexibility same as block-based theme. Add…
-
How to remove WordPress default block patterns?
WordPress provides developers with the ability to manage block patterns efficiently. Here’s how you can remove default block patterns or unregister specific ones. Removing All Default Block Patterns To remove…
-
Get post type in block editor
If you want to get post type in a block editor script, you can use the following code to get the post type:
-
What are the useDispatch and useSelect?
The useDispatch and useSelect are Custom React Hooks that enable a more declarative interface to registered stores in the registery These hooks are available in the @wordpress/data package. useSelect and useDispatch are, custom hooks…
-
How wp.blocks.parse() works?
Basically we will talk about wp.blocks.parse! wp.data.select(‘core/editor’).getEditedPostContent(); is used to get the value by HTML comments from the editor. Let’s create a new post by going into wp-admin. Now use…
-
How the Gutenberg Editor reconstructed from plain HTML
Let’s understand how Gutenberg Editor reconstructed from plain html which is stored in database. Firstly, whenever we load post in a block editor page. We load a html post content…