Full Site Editing Non-editble global styles?
Full Site Editing Non-editble global styles?
Full Site Editing Non-editble global styles?
After some more checking, I found the issue. The repo I was setting up, was a template that will be used by other sites, so I saved it in a folder called templates (Full path: /Users/bas/git/work/templates/wp). In the wp-includes/block-template-utils.php the name/slug of the template is decided with the following code. $template_slug = substr( $template_file, // … Read more
When creating a page template in Appearance > Editor you can add a Post Content block. This is where the page content goes. Everything else is part of the template and applies to all Pages that use the template. When you go to Pages > All Pages and select a page to edit, or use … Read more
There’s no definitive list that I’m aware of. If you want to get the markup for a block the only reliable way to do that is to insert it into the editor and then copy the result to the clipboard. You cannot assume that all blocks are “<!– wp: plus post-title plus optional attributes {tag: … Read more
How can I disable fontSizes of the Paragraph block inside the Quote block with theme.json?
There is a No Results block that can be added to the query loop block. Any inner blocks added to it will be displayed when there are no results. Most blocks are supported as inner blocks. Here’s the markup of an example where I added a group block containing a paragraph block: <!– wp:query-no-results –> … Read more
Prevent executing query for wp_global_styles
In block themes patterns won’t have access to context such as id it seems: https://developer.wordpress.org/block-editor/reference-guides/block-api/block-patterns One has to create a custom block to get post id and use useSelect hook to get post Id like so: import { useSelect } from “@wordpress/data”; … inside Edit block function: const postId = useSelect(select => select(‘core/editor’).getCurrentPostId()); then, postId … Read more
Update Content for a Custom Block Toolbar Button
Adding my solution so far, though it doesn’t seem ideal to me. Also the .entry-content parent doesn’t get applied in the editor. /* trick to have root paragraphs left-aligned “in the central wrapper” without extra dom */ .entry-content > p{ padding-right:calc(1264px – 830px); max-width:1264px; box-sizing:border-box; } @media only screen and (max-width:1300px){ .entry-content > p{ padding-right:calc(100% … Read more