Full site editing templates folder vs block-templates

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

Get postId in a wordpress pattern file?

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

Narrow paragraph block aligned to left of “wrapper”

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

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