4
votes
Accepted
Where are the layout defaults in Twenty Twenty Two coming from?
there's a layout option for the post content block that says it will inherit the default layout. Where is that default coming from?
In block themes, the default layout settings (contentSize and ...
3
votes
Accepted
What is the "correct" way to add hooks or similar PHP behavior to a blocktheme?
I'm not the most experienced in block themes, but from what I've seen of them so far I feel pretty confident in saying that the functionality you describe should be implemented as a block. But it's ...
2
votes
What VSCode extensions are there for working with block themes?
It's missing some very new blocks (for example templates, template parts), but there is the autocompleter for block grammar.
2
votes
Accepted
How do a I add an attribute to <html> element (when using block theme)?
It's possible to use the language_attributes filter as before since the template canvas in FSE contains:
<html <?php language_attributes(); ?>>
Add this code to the appropriate place in ...
2
votes
How to add code to `head` with WordPress 5.9 FSE (Full Site Editing)
When I was creating a FSE theme I had the same question. I found that the Shorcode Block is an easy way to insert coding into any template. So for a shortcode [custom_content] this is the coding ...
1
vote
Where are the layout defaults in Twenty Twenty Two coming from?
It's not specific to Twenty Twenty Two - the post content block layout option allows you to override the default width defined by the active theme.
1
vote
Setting global block attribute value
You could make use of register_post_field() to add the API key to the post object which you then can retrieve via getEditedPostAttribute() in the editor.
In register_post_field() you can define by ...
1
vote
Wordpress Gutenberg InnerBlocks renderAppender not showing with template
I have found my typo - It should be
const ALLOWED_BLOCKS = ["grid/item", "core/image"];
not
const ALLOWED_BLOCKS = ["grid/item, core/image"];
If the allowed block type ...
1
vote
Accepted
How to properly package a block plugin
Create a folder named includes in the root of your plugin folder; and place your additional php files inside of there. They (andchild folders and files) should then be copied over with plugin-zip.
If ...
1
vote
Accepted
Wordpress Full Site Editing: How can I access my posts listing page?
Yes it sounds like there might be some sort of disconnect, as the template editor doesn't make this clear, but keep in mind that FSE is still marked as being in Beta in the latest version of WordPress....
1
vote
Accepted
Convert GMT time to local time in Gutenberg Block Editor
I'm wondering if I can use any of the functions listed in the
@wordpress/date
package to convert a GMT date to a date in the user's locale.
Yes, you can use the dateI18n() function.
However, the ...
1
vote
How to add Internationalization in WordPress using Javascript/React?
I see that you do not use register_block_type in PHP, which is now recommended way to register block. I am assuming you register block in the front-end ( I am not familiar with create-block ), and ...
1
vote
Wp-script package stop to work
Finally i found the problem !
There was a problem in the scss file which stop the building script. I had no error message.
I think that the problem was that i used a sass variable which was too long.
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
block-editor × 1473javascript × 187
plugin-development × 144
plugins × 82
theme-development × 58
css × 51
images × 47
rest-api × 45
custom-post-types × 41
php × 39
filters × 39
hooks × 38
editor × 33
customization × 31
advanced-custom-fields × 27
posts × 26
custom-field × 25
functions × 24
shortcode × 22
templates × 22
post-meta × 22
themes × 20
gallery × 20
widgets × 18
categories × 16