Gutenburg InnerBlock single child

The only way to do this at the moment is by using the renderAppenderprop onInnerBlocks. This prop is only available in the Gutenberg plugin until WordPress 5.3 is released. The theory would be to use state in each CustomCard to track if there has been a block added, then return false from the renderAppender function … Read more

How can I add arbitrary `data-` attributes to a block’s `edit()` container?

You can define a getEditWrapperProps function when you register the block, and return an object that sets the props for the wrapper. The function will be passed the props for the block, in case those are needed. registerBlockType( ‘wpse/example-get-edit-wrapper-props’, { title : ‘getEditWrapperProps() Example’, // … getEditWrapperProps( props ) { return { ‘data-foo’: ‘bar’, ‘data-quix’: … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)