Magic Block


Magic Block registers a container block with the block editor. This block has settings for element (div, section, etc), ID, classname, inline style, and any other attribute (including data-*, and aria-*) via a custom attributes section.

Magic Block is designed for people who want full control over post HTML structure, or wish to use the editor to create complex layouts such as Flexbox, CSS Grid, Bootstrap, etc…

This block does not add any CSS styles that you, as a developer, do not provide. Rather, it allows you to easily contain other blocks in parent elements with an arbitrary ID or Class. You may then easily target these container elements by ID or Class in your theme’s stylesheets or through CSS plugins. For smaller customizations there is an inline style field which maps to the “style” HTML attribute for the container element.

In the editor view, each Magic Block has a thin grey outline so you can easily see which child elements belong to it. It also provides a display of element type, ID, and classes so you can keep track of how to target them with your CSS.

As of WordPress 5.3 you might not need this plugin since the core now ships with a “Group Block” which is similar in purpose, although it has fewer options.


  • You can nest magic blocks inside each other to build complex layouts.
  • Custom attributes supported


This plugin provides 1 block.

  • Magic Block


3 ਅਕਤੂਬਰ 2019
This is the only plugin I can find that allows inline stylings. I needed this in order to use tcpdf with my website. Awesome plugin! Thank you so much.
30 ਸਤੰਬਰ 2019
This plug-in is just perfect! It is exactly what I needed for my WordPress theme project. Simple yet very powerful. Not a lot of unnecessary blocks you don't want / need, only container blocks are provided. It does exactly what it says in the description. Gives you full control of layout by providing container blocks that you can style according to your wishes in your stylesheet. You can create several different types of container blocks since you can choose which tag should act as the container. For example, the standard container block is a <div> but if you wish you can change that to a <section> or an <aside> (or some other tag) or even better, for example you can have both a <section> and an <aside> container (or some other tag). So happy with this plug-in! 5 out of 5 stars!
12 ਅਪ੍ਰੈਲ 2019
Finally something simple for programmers to make Gutenberg useable! Works like a charme... Only usability can be optimized, for example in backend adding some backgroundcolors for better differentiating the nesting levels when you have nested in several levels... and when adding new block there is always an empty block which I don't need when I move existing blocks into the div/section... but that might be default WP behaviour, I have to type some letters and delete the block then... But for the first: Awesome addon 😉 Thanks for development.
28 ਫਰਵਰੀ 2019
I try it and it's very helpful. Thank you
Read all 5 reviews

ਯੋਗਦਾਨੀ ਤੇ ਵਿਕਾਸਕਾਰ

“Magic Block” is open source software. The following people have contributed to this plugin.


“Magic Block” ਦਾ ਆਪਣੀ ਭਾਸ਼ਾ ਵਿੱਚ ਅਨੁਵਾਦ ਕਰੋ।

ਵਿਕਾਸ ਕਾਰਜ ਵਿੱਚ ਰੁਚੀ ਰੱਖਦੇ ਹੋ?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.