admin管理员组

文章数量:1312748

I use a default custom image block in all my articles in 3 blogs, aligned left, link to media file.

In Gutenberg every time I upload/insert a new image I have to reconfigure those settings.

Seems stupid but it's frustrating if you only use 2-3 kind of blocks repeatedly, a long waste of time.

Is there some way to define "default settings" for some block, especially paragraph and image?

I use a default custom image block in all my articles in 3 blogs, aligned left, link to media file.

In Gutenberg every time I upload/insert a new image I have to reconfigure those settings.

Seems stupid but it's frustrating if you only use 2-3 kind of blocks repeatedly, a long waste of time.

Is there some way to define "default settings" for some block, especially paragraph and image?

Share Improve this question edited Dec 16, 2020 at 9:48 Tom J Nowell 61k7 gold badges79 silver badges148 bronze badges asked Dec 16, 2020 at 9:18 resunoizresunoiz 31 bronze badge 1
  • Is this a custom block you have written? Or are you talking about block templates? Or block patterns? Keep in mind this is a programming stack, any answer you get will need basic programming knowledge to understand, if that's not what you expected then you should ask on the support forum. If you have code can you share it? Use the edit link under the tag list to add it to your question – Tom J Nowell Commented Dec 16, 2020 at 9:46
Add a comment  | 

1 Answer 1

Reset to default 0

As Tom mentioned, you can use Templates, which allows you to define a preset of blocks that are available by default in your post whenever you try to create a new post: https://developer.wordpress/block-editor/developers/block-api/block-templates/

If you aren't ready to get your hands dirty with code, you can also use Justin Tadlock's Block Pattern Builder plugin to create and re-use block patterns across your site: http://wordpress/plugins/block-pattern-builder

Hope it helps!

本文标签: Blocks How to store default settings