Blocks. How to store default settings?

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?

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

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.org/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.org/plugins/block-pattern-builder

Hope it helps!


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x