I am trying to learn how to use Gutenberg and would like to start with a simple plugin to modify the built-in button block.

Basically, I'd like my plugin to do two things.

One - modify the underlying html. Right now, the button is an a tag inside of a div tag. I just want an a without the div tag.

Secondly, I'd like to be able to add my own, custom classes (and not use the built-in classes).

Does anyone know how to do this?


  • Take a look to Block Filters. I would build a new block rather than modify the html of the core one. You are asking several things here, if you could give some code and focus on one per question it'd be easier to give some hints. Thanks. – Alvaro Dec 2 '18 at 20:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.