Full width post



Gutenberg Full Site Editing supports custom page templates. To use these you need to specify the template names in the `experimental-theme.json` file.
I’ve created a custom template called single-full.html
, with a description “Full width stuff”. The theory is that I can use this to display a post with wide width and full width images.
"customTemplates": [
{
"name": "single-full",
"title": "Full width stuff",
"postTypes": [
"page",
"post",
"block",
"block_example"
]
}
]
Note: Documenation is at https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-json/#other-theme-metadata
Notes about experimental-theme.json validation
The example contains comments. You have to delete these to get the JSON to work. If you don’t then you could spend ages wondering why the system’s not working the way you expect.
When the PHP code loads the file it calls json_decode()
. If this gets a Syntax error then you don’t get told a thing.
You can get syntax errors very easily, even if you use an IDE such as PhpStorm.
To validate the JSON file I’ve been using https://jsonlint.com/