digitoimistodude / air-light

💨 WordPress starter theme - designed to be minimal, ultra-lightweight (< 20 kB) and easy for all kinds of WordPress projects. 7+years/1000+hours of development and still updating daily! We prefer the original WordPress way of doing things so no strange templating languages or frameworks here.
https://airwptheme.com
MIT License
929 stars 139 forks source link

No blocks available in page editor #214

Closed semidivine closed 4 months ago

semidivine commented 4 months ago

From the docs I understood that gutenberg blocks were enabled by default. I have none available to me, the page edit screen's "plus" button to add blocks is disabled. Did I miss something in the theme set up? I cannot find any information about this. Thank you!

Screenshot 2024-03-14 at 2 18 27 PM
ronilaukkarinen commented 4 months ago

This is a dev starter theme so there is nothing by default. We do not provide full docs because this is just a starting point. You might want to read Creating your own Gutenberg blocks with Air light and Advanced Custom Fields (background: #119).

semidivine commented 4 months ago

Yes I am aware it is a starter theme, it's awesome. The extensive sass files for the gutenburg blocks led me to believe the functionality was built in. I'll just build what I need!

semidivine commented 4 months ago

Actually, I figured it out, it was easy to enable core gutenburg blocks in functions.php. The code was already there. On line 139 I changed this:

     'allowed_blocks' => [
            'default' => [],

to this:

     'allowed_blocks' => [
            'default' => [
                'core/gallery',
                'core/image',
                'core/video',
                'core/code',
            ],

and enabled exactly the blocks I needed.