There are dozens of options available in Gutenberg for building a post, the amount of data coming through the Headless WordPress API can make it hard to manage presentation on the front end. To handle this we can filter out blocks that we won't use so that we can reasonably expect what data will be coming through the API.
In this lesson, we will limit the blocks available in the editor by adding the allowed_block_types
filter.
I am sure using child themes is outside the scope of this course, but you should at least mention the risks of editing a theme directly.
When using a theme developed by someone else they will occasionally have updates posted by the developers. If you take the update, your changes could be overridden. So it's always a good idea to make a child theme before starting to make changes. Then your changes can be protected for future updates to the parent theme.
Super helpful, Simeon! Thanks for sharing. I'll think about how best to communicate that.
Thanks for the course, really interesting! Do you have a list or can suggest what types of blocks filter for an average blogging experience?
Hey!
Glad you've enjoyed the course so far.
It really depends on what you want. It's worth having a look on blogging platforms like Medium, Hashnode, etc. and have a think about what you'd like on your platform.
For me it would be something like:
Yours might be different, though.