• I want a custom block type that I can reuse but it is very very simple. I just want a Group block type that has a bit of a bigger margin at the bottom. I don’t want to change every existing Group I want this to be a different type of Group (Section Group). Do I really need to create a new custom plugin to have a custom block type just to add a 20px margin to the bottom? Is there some other way?

Viewing 2 replies - 1 through 2 (of 2 total)
  • lisa

    (@contentiskey)

    a few ideas:

    *You could create a custom “Block Pattern” — it does involve a bit of custom code that can be put into a simple plugin. https://richtabor.com/patterns/

    *You could create try a reusable block — using group block and a custom css class (no plugin needed).

    *which theme are you using?

    *I have found value in the learning resources about using using theme.json to create default settings for various blocks.
    https://www.youtube.com/c/DaisyonWP

    Thread Starter oddible

    (@oddible)

    Thanks, I’m using Astra.

    Yeah, if I’m going to do all the work for a Block Pattern, I’m just going to make a new plugin for a custom block type.

    A Reusable Block is ok when I’m starting a page but fixing formatting by just changing a Group to a “Section Group” isn’t really possible with a Reusable – it just gives me the empty pattern, I can’t use it to change a block.

    Guess I’m making a new plugin to add 20px to the bottom of a new Group type. :/

    • This reply was modified 2 years, 3 months ago by oddible.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Easy way to create a simple custom block type?’ is closed to new replies.