4

I want to remove the border radius settings from button block so users can't access it since I don't want them getting confused on why it's "not working" (I forced 0 radius in the css for now).

enter image description here

I've been able to additional settings with editor.BlockEdit but I'm still having problems trying to remove them from core blocks and I don't see a way to target it with css to just hide them.

0

1 Answer 1

3

Create a theme.json file in the root of your theme, and add this inside:

{
  "version": 1,
  "settings": {
    "blocks": {
      "core/button": {
        "border": {
          "customRadius": false
        }
      }
    }
  }
}

It will only work from WordPress v5.8 and above, because it requires Gutenberg v10. However Gutenberg v10 can be installed as a plugin on older versions of WordPress too, in which case it works with older WordPress versions as well, such as the currently latest stable release v5.7.2 (which is based on Gutenberg v9 by default).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.