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 ...
user avatar
  • 32.1k
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 ...
user avatar
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.
user avatar
  • 525
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 ...
user avatar
  • 64.1k
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 ...
user avatar
  • 21
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.
user avatar
  • 35.6k
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 ...
user avatar
  • 656
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 ...
user avatar
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 ...
user avatar
  • 525
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....
user avatar
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 ...
user avatar
  • 32.1k
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 ...
user avatar
  • 416
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.
user avatar
  • 54

Only top scored, non community-wiki answers of a minimum length are eligible