Gutenberg gallery settings in Blocksy

[ad_1]

I would like to set the default wordpress gallery in guttenberg to 1. Somewhere I found this code that needs to be inserted into functions.php

function set_default_block_spacing( $editor_settings ) { $editor_settings[‘__experimentalBlockSpacing’][‘value’] = 1; return $editor_settings; } add_filter( ‘block_editor_settings_all’, ‘set_default_block_spacing’ );

But the code doesn’t work after pasting and I find it too complicated. Can anyone advise a simpler way (via add CSS) to set all block spacing by default in galleries to 1?

I also try to set

.wp-block-gallery .blocks-gallery-item {
margin-right: 1px;
}

doesnot work

Thanks

  • This topic was modified 1 hour, 15 minutes ago by peterertl.
  • This topic was modified 1 hour, 6 minutes ago by peterertl.

The page I need help with: [log in to see the link]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer