Questions tagged [gutenberg-blocks]
515 questions
3
votes
1 answer
How do I create an InnerBlocks component for WordPress Gutenberg without React?
I feel like I'm so close to just wrapping up this custom Gutenberg block.
What works:
Adding new block
Editing block / adding custom inner blocks
Saving block
Viewing block on frontend
What's broken:
After saving block, if I refresh the editor…

AuRise
- 2,253
- 19
- 33
3
votes
1 answer
Gutenberg Gallery Block – Same Size Pictures Fix
I just want to share a quick fix for the Gutenberg gallery since I couldn't find the fix anywhere else. What will fix:
Problem: If you upload images to your gallery that have different sizes, the thumbnails are displayed in different heights on…

COS
- 505
- 2
- 4
- 22
3
votes
1 answer
ServerSideRender attributes does not passed to backend
I'm using @wordpress/server-side-render to get the content of the Gutenberg block from the backend side.
if ( props && props.attributes ) {
blockContent =

Alper BULUT
- 284
- 2
- 8
3
votes
1 answer
WordPress: Add aligncenter to Gutenberg groups block
Per default, the Gutenberg groups block has only two alignment options: wide and full width.
I now want to add a custom alignment center to the block. Other blocks like images have this option.
Is there any way to extend a core block like this?
I…

Cray
- 5,307
- 11
- 70
- 166
3
votes
1 answer
Remove settings from Gutenberg core block
From the core/image block in Gutenberg, I am trying to remove both the 'image size' and 'image dimension' settings. Is this possible to do without copying the entire block and removing the parts I wish to omit? The only things that come close to…

Dirk J. Faber
- 4,360
- 5
- 20
- 58
3
votes
0 answers
get_fields is empty after inserting an ACF gutenberg block
we just integrated timber into our acf-gutenberg-block setting, and we love it. ;)
There is one thing that doesnt work.
Our ACF Blocks have prefilled values like a "dummy" headline.
But when a backend user adds a block into the gutenberg view, the…

Thomas Wegerer
- 31
- 2
3
votes
1 answer
How to fix a Gutenburg block error - A component is changing an uncontrolled input of type url to be controlled
I am getting this error when I add a value to the buttonUrl input.
A component is changing an uncontrolled input of type url to be controlled. Input elements should not switch from uncontrolled to controlled (or vice versa). Decide between using a…

Journeyman73
- 43
- 2
3
votes
1 answer
How to debug blocks in Gutenberg wordpress?
I am building a new block for Gutenberg wordpress and when I get errors is it impossible for me to know what is wrong. Are there any steps for debugging blocks? How to get more specific information on the error?
I have react dev tools on chrome. I…

Alexey Tseitlin
- 1,031
- 4
- 14
- 33
3
votes
1 answer
Run a piece of code when block is loaded in wordpress
I have made a custom gutenberg block:
(function(blocks, components, element) {
var el = element.createElement;
var registerBlockType = blocks.registerBlockType;
var TextControl = components.TextControl;
…

U-Dev
- 1,296
- 5
- 19
3
votes
1 answer
Gutenberg RichText cursor focus automatically focus out
I'm trying to enter text via Rich Text by function. but cursor automatically getting outside the RichText.
I already import essential component which need on it. I also tried it by onKeyUp instead on onChange but also not working.
It's working good…

Feroz Ahmed
- 931
- 10
- 16
3
votes
0 answers
Remove heading options from Gutenberg core block
I want to remove the heading options for the Gutenberg core block using filters.
Here is what I tried:
const { createHigherOrderComponent } = wp.compose;
const withInspectorControls = createHigherOrderComponent( ( HeadingToolbar ) => {
return (…

Dennis
- 318
- 2
- 11
3
votes
1 answer
Gutenberg RichText Custom block Attributes. "Array & Children" or "String & HTML"?
I'm tring to make dynamic custom block using "RichText" and wondering how to set it's attributes.
By checking examples on the internet, some people set its attributes to "Array & Children" but I also found the examples with "HTML & Class Name".
I…

abms
- 545
- 1
- 3
- 13
3
votes
1 answer
How to exclude parent block from innerBlocks?
I want to make a Section block in WordPress Gutenberg. I have created a section block and used Gutenberg component as inner/child blocks. It is working fine but Section block itself showing as its inner blocks list. I want to exclude…

webHasan
- 461
- 3
- 11
3
votes
1 answer
Can I add a custom data-attribute tag to a gutenberg element
I have a richtext element in a block, and want to create my own 'my-data-attribute' and have it included in the output, but I can't seem to find anyway to do this. I already have my attribute working with SelectControl and all that, I just can't…

James Dvorak
- 31
- 3
3
votes
2 answers
How can I access the values of an inner block in Gutenberg?
I'm trying to build a custom block for Gutenberg. It is a carousel and uses child blocks (images). I'm trying to find a way to find out how many image-blocks were created inside to block so I can create slides for the carousel accordingly.
In order…

Carlos G
- 479
- 1
- 8
- 19