Insert a group block inside a list item

My solution is to use CSS to simulate numbers (or bullets) on a group (which is a <div>). So I first created groups within groups, and then I added CSS class on the topmost group: .numbered-list { counter-reset: item; } And for each item, the group has this class: .numbered-list-item { } .numbered-list-item:before { content: … Read more

How do I set register_meta for a specific CPT?

register_post_meta has a post type parameter, or just set object_subtype to the post type. register_meta( ‘post’, ‘_duib_cl_heading’, [ ‘auth_callback’ => ‘__return_true’, ‘default’ => __( ”, ‘_duib_cl_heading’ ), ‘show_in_rest’ => true, ‘single’ => true, ‘type’ => ‘string’, ‘object_subtype’ => ‘testimonial’, ] ); Or register_post_meta( ‘testimonial’, ‘_duib_cl_heading’, [ ‘auth_callback’ => ‘__return_true’, ‘default’ => __( ”, ‘_duib_cl_heading’ ), … Read more

Debouncing Input value with block attributes

You can use useDebounce or debounce (you also have throttle) in package @wordpress/compose I did not test the code, but something like that: import { useDebounce } ‘@wordpress/compose’; function Edit({attributes, setAttributes}) { debounced_selectTheme = useDebounce(selectTheme, milliseconds, options) <TextControl key=”music-search-input-control” label={ __( ‘Search’, ‘aawp’ ) } value = {theme} /* you have a typo in code … Read more