Consistent inline styling in a Gutenberg-paragraph-block

To add custom options to that dropdown, you’d want to look at utilizing the Formatting API. Below are the main points quoted from the Block Editor Handbook step-by-step guide: Step 1: Register a new format The first step is to register the new format, add src/index.js with the following: import { registerFormatType } from ‘@wordpress/rich-text’; … Read more

Custom Gutenberg block within column block selection and update issue

You seem to have useBlockProps() and extra props outside of this hook: <div { …useBlockProps() } className=”card” style={{ backgroundImage: `url(${imageUrl})`}} > Your className would override any className value provided by the useBlockProps(), potentially causing the undesired behavior. Instead, consider merging the props into the props that would be emitted by useBlockProps() by passing them into … Read more

Building my first ever Gutenberg block

Gutenberg recently upgraded JSX Runtime which is only compatible WP >= 6.6. See link https://make.wordpress.org/core/2024/06/06/jsx-in-wordpress-6-6/ If you update WordPress to 6.6-beta2 then it should work. In the meantime they are figuring out about back compatibility. See comment – https://make.wordpress.org/core/2024/06/06/jsx-in-wordpress-6-6/#comment-46779 Or if you are not ready to upgrade to WP 6.6 yet, you can downgrade @wordpress/scripts … Read more

How to set autoload from “yes” to “no” _transient_wp_core_block_css_files

Don’t bother messing the with autoload on the transient. If you’re truly not using blocks at all, just unhook the function that creates the transient and uses it to register the style handles: remove_action( ‘init’, ‘register_core_block_style_handles’, 9 ); Just be aware that if you do use blocks, their stylesheets will not load until you let … Read more

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