Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
raftaar1191 authored Jul 31, 2024
1 parent 600cf56 commit 3a2df21
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,20 @@ Now are using the https://github.com/x3p0-dev/x3p0-ideas/tree/block-example exma
### Create blocks

1. Once everything install goto `src/` folder create directory `blocks` and inside that directory run `npx @wordpress/create-block@latest wordpress-plugin-boilerplate-block --variant=dynamic --no-plugin`

2. Now run `composer require wpboilerplate/wpb-register-blocks`
3. Now add `if ( class_exists( 'WPBoilerplate_Register_Blocks' ) ) {
new WPBoilerplate_Register_Blocks( $this->plugin_dir );
}` inside the define_public_hooks method of your plugin
3. Now run `composer update`
4. Once that is install run `npm run build`

3. Now add
`if ( class_exists( 'WPBoilerplate_Register_Blocks' ) ) {
new WPBoilerplate_Register_Blocks( $this->plugin_dir );
}`
inside the define_public_hooks method of your plugin

4. Now run `composer require wpboilerplate/wpb-register-blocks`

5. Now run `composer update`

6. Once that is installed run `npm run build`

# Composer

Expand Down

0 comments on commit 3a2df21

Please sign in to comment.