Disable title block on edit screen for a custom post type

I initially didn’t believe this is possible officially at the moment, the post title is always included: https://github.com/WordPress/gutenberg/blob/a6a0d3d47d24b83a58db7130fa82133428067326/packages/edit-post/src/components/visual-editor/index.js#L77 <div className=”edit-post-visual-editor__post-title-wrapper”> <PostTitle /> </div> The only exception at the moment is if a block template is being edited. In particular, this isn’t a block. There is a post title block but it’s only used in full … Read more

Dynamic Gutenburg block output echoes in WP Dashboard

Excerpt from “Creating dynamic blocks” in the block editor handbook: The server-side rendering is a function taking the block and the block inner content as arguments, and returning the markup (quite similar to shortcodes) So despite the “render” as in render_callback, a block render callback should not actually echo anything (and neither call any functions … Read more

Notices in the Block Editor with multiple lines

The 3rd parameter for the function accepts a private option named __unstableHTML which if true, then enables HTML in the notice message/content: createNotice( ‘success’, ‘Post published.<br /> Line 2. Should work in WordPress 5.8.’, { __unstableHTML: true, // true = allows HTML; default false isDismissible: true, actions: [ … ], } ) However, in the … Read more

Gutenberg Button Border Radius Default

This should theoretically work by defining the initial value in theme.json as shown in these examples https://gist.github.com/skorasaurus/d50ea7eb79d664775418492e46cef021 and https://github.com/WordPress/theme-experiments/blob/304e6ef3d561f048c87d9bc27311328ae8197bae/tt1-blocks/theme.json#L276 however, the value is still unset when I tried it out in a theme and it appears they may have disabled it – https://github.com/WordPress/gutenberg/issues/29210

How to set Gutenberg preferences programmatically with wp.data.dispatch?

This correctly shows true/false when the option for Reduce the interface is enabled/disabled through the GUI. Are you sure isFeatureActive( ‘reduceInterface’ ) worked? Because I looked at the source code (see wp-includes/js/dist/edit-post.js) and then I found out that the feature name is actually reducedUI and not reduceInterface. So try with reducedUI instead: let reduceInterface = … Read more

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