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
1 Answer
Reset to default 0As 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
版权声明:本文标题:Blocks. How to store default settings? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741909583a2404361.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论