Skip to content

Instantly share code, notes, and snippets.

@wolfcoder
Last active May 18, 2023 03:45
Show Gist options
  • Save wolfcoder/d08705a5c1c718eba71a54c9c491e35b to your computer and use it in GitHub Desktop.
Save wolfcoder/d08705a5c1c718eba71a54c9c491e35b to your computer and use it in GitHub Desktop.
sample guttenberg block
const { registerBlockType } = wp.blocks;
registerBlockType( 'my-plugin/hello-world', {
title: 'Hello World',
icon: 'smiley',
category: 'common',
edit: () => {
return (
<p>Hello World!</p>
);
},
save: () => {
return (
<p>Hello World!</p>
);
},
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment