How to Create a Custom Block Type for Gutenberg Block Editor in WordPress | Part 1

preview_player
Показать описание
In this lesson we are going to learn how to code our own new block type.

Watch Full WordPress Theme Development Course here

==============
IMPORTANT
==============
Education should be FREE but if you can afford it buy course from here

#codeplusplus #wordpress #GutenbergBlockEditor
Рекомендации по теме
Комментарии
Автор

For those looking for the function from the beginning in the description (not present at time of writing):

<?php

/**
* Plugin Name: Your Block Name Here
* Author: Your Name Here
* Version 1.0.0
*/

function loadMyBlockFiles(){
wp_enqueue_script(
'my-super-unique-handle',
plugin_dir_url(__FILE__) . 'my-block.js',
array('wp-blocks', 'wp-i18n', 'wp-editor'),
true
);
}

add_action('enqueue_block_editor_assets', 'loadMyBlockFiles');

jacklinhart
Автор

Again it's another great lesson I have enjoyed. Thank you so much.

nurakhtar
Автор

Great tutorial! It's been days since I was searching for the basic method but all I saw were the shortcut ones. It is very clear in this video, how it all works. Thanks!

blurryface