Skip to content

Boilerplate of Wordpress plugin, OO, with definition of CPT, and using of @wordpress/scripts, custom webpack.config.json to bundle to blocks. Working ok.

License

Notifications You must be signed in to change notification settings

cobianzo/bsd-wp-plugin-cpt-and-two-blocks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Plugin

This plugin defines:

  • CPT Dogs: you can select it on the menu and create new custom post Dogs.
  • Block Dog Meta in Single Dog
  • Block Dog Meta Optional in Single Dog

At the moment the blocks don't have almost attributes, it's mostly empty.
But it works. We have set up webpack.config.js so there are 2 entry points, one for every block.

Blocks are defined without block.json, because it is not possible to bundle both blocks with this setup.

FILES TO SEE

For the Plugin

Go directly to

  • core/includes/classes/class-...-run.php

For the block

  • core/includes/assets/
  • There the block filesysytem was created with @wordpress/create-block, setting up the wp-scripts for it
  • From that folder, run npm run start

About

Boilerplate of Wordpress plugin, OO, with definition of CPT, and using of @wordpress/scripts, custom webpack.config.json to bundle to blocks. Working ok.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published