Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
WordPress 5 Cookbook

You're reading from   WordPress 5 Cookbook Actionable solutions to common problems when building websites with WordPress

Arrow left icon
Product type Paperback
Published in Mar 2020
Publisher Packt
ISBN-13 9781838986506
Length 660 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Rakhitha Nimesh Ratnayake Rakhitha Nimesh Ratnayake
Author Profile Icon Rakhitha Nimesh Ratnayake
Rakhitha Nimesh Ratnayake
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Preface 1. Setting Up WordPress and Customizing Settings 2. Customizing Theme Design and Layout FREE CHAPTER 3. Using Plugins and Widgets 4. Publishing Site Content with the Gutenberg Editor 5. Managing Users and Permissions 6. Setting up a Blogging and Editorial Workflow 7. WordPress as an Application Framework 8. Improving Usability and Interactivity 9. Building E-Commerce Sites with WooComerce 10. Troubleshooting WordPress 11. Handling Performance and Maintenance 12. Improving Site Security 13. Promoting and Monetizing the Site 14. Other Books You May Enjoy Appendix

Creating reusable Gutenberg blocks

We've already looked at the importance of blocks in organizing the structure of content and keeping them as independent components. Reusability is another advantage of this block-based editor. By default, we get a set of blocks built into WordPress. We can reuse them multiple times within a single post/page without duplicating a large amount of code. The new editor also provides features that we can use to create custom blocks and reuse them across multiple posts or pages.

In this recipe, we are going to look at the process of creating reusable blocks and using them inside the editor.

Getting ready

Special preparation is not required for this recipe. The necessary features are available...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime