How to defer block.json scripts?
How to defer block.json scripts?
How to defer block.json scripts?
I think you should use filters instead, and here are examples based on your code: (these should be added to your theme functions.php file) Filter 1, to be hooked on the render_block_data hook: function my_render_block_data( $parsed_block ) { // Check whether it’s a group block. if ( ‘core/group’ === $parsed_block[‘blockName’] ) { // Check whether … Read more
Since you are using your own installation of WordPress you have a greater ability to make changes. If you open your post in the browser and right click on your bullet point (list item), and select Inspect you should be able to see the element, (in this case ol and also li) and see how … Read more
Is it general understanding that patterns should be updated manually across all pages if it is updated in one page? Yes. Block Patterns are essentially shortcuts for adding a collection of blocks all at once. Once the blocks are inserted they exist as independent blocks just like any others. There’s no meaningful difference in the … Read more
To add a readable title to a template, we can add the following to theme.json “customTemplates”: [ { “name”: “single-post-type-name”, “title”: “Single Post Type Name” }, … But as Will mentioned in the comments, it is not possible to add descriptions yet. There is an issue to track it here: https://github.com/WordPress/gutenberg/issues/44097
You can achieve that by applying the the_content filters, just like what the_content() does: $content = get_the_content(); $content = apply_filters( ‘the_content’, $content ); $content = str_replace( ‘]]>’, ‘]]>’, $content ); echo $content; Or the other way is by applying do_blocks() on the content: $content = get_the_content(); $content = do_blocks( $content ); echo $content;
I tested this just now, created functions.php in twenty-twenty-three and it does work. I created two full site editing themes so far, and both have functions.php, so it definitely works. My previous remark about supplying true argument to filter was incorrect, thanks to @Rup for pointing that out. add_filter parameter is always callable and __return_true … Read more
There’s a part in the documentation which says: (bold and italic formatting added by me) The useInnerBlocksProps is exported from the @wordpress/block-editor package same as the InnerBlocks component itself and supports everything the component does. So yes, you can set a template via useInnerBlocksProps, using the second parameter like so: const innerBlocksProps = useInnerBlocksProps( blockProps, … Read more
You would do this with a stack block and 2 rows. In WP v6.1 and Below The missing part though, as that because the cover block does not use flex layout like the group block does, there’s no way to put the extra height in that you need to separate the menu from the title. … Read more
You haven’t set the font in the block editor, instead you’ve added an additional font family option! Instead use global styles instead to style the text: { “styles”: { “typography”: { “fontFamily”: “‘Mulish’, sans-serif” }, } } Now the default will be Mulish, additionally setting fontFamilies to [] in the typography section will remove the … Read more