-
ch1800
Hello,
I just want to create a basic image gallery with the standard WP block but cannot find its related settings for dimensions, margins, padding, etc.I don’t want to use the GP grid block because everything that used to be simple becomes terribly complicated and a waste of time. Too many options are often overkill with your own blocks.
-
Hi there,
Unfortunately, the options are only available in block themes. While GeneratePress (GP) is a PHP-based theme, the same limitations apply to themes like Twenty Twenty-One; even though it’s a WordPress theme, it is still PHP-based.
-
ch1800
Thanks but maybe my message was not clear. I don’t understand your reply here.
I’m talking about a block theme indeed. I’m testing with your Java theme from the library.So, I’m asking about the standard Gallery GUTENBERG BLOCK, compared to the grid GENERATEBLOCK. Both are blocks. How to have those dimension settings in blocks for the Gallery block. I don’t know how to ask this in another way, sorry.
-
Alvind
Hi there
Try adding this snippet:
add_action('after_setup_theme', function () { add_theme_support('appearance-tools'); add_theme_support('custom-spacing'); });Adding PHP: https://docs.generatepress.com/article/adding-php/
The snippet should add support for the Dimensions settings for the core blocks.
-
ch1800
Thanks. Is this a normal procedure?
I mean, those blocks never have those settings available and always have to add them manually? -
I’m not sure about that. It’s a core WordPress block, so I don’t know why they decided not to include that setting for all themes.
As far as I know, this setting is available for block-based themes. Since GP is a classic theme, and for all the classic themes you need to add that small snippet to enable it.
-
Oh, I see, thanks.
I didn’t even know that some themes are labelled as “block-based” and the others are considered as “classic”… I had a look at the repo and they don’t seem to have many active installs but I might be wrong of course. -
Alvind
Yeah, I think users still prefer classic themes. You can’t really compare active install metrics since classic themes have been around much longer than block themes.
- You must be logged in to reply to this topic.