Experience Level: Beginner PHP, Intermediate to Advanced JavaScript
In this tutorial – published Nov. 15. 2018 – Jason Bahl covers how to build the same custom testimonial block two different ways: Extending Advanced Custom Fields PHP, and create-guten-block with JavaScript.
Article:
Topics Covered:
- Extending Advanced Custom Fields to register, style, and render a custom testimonial block using example PHP, HTML, and CSS
- Registering and rendering ACF fields for the custom block with PHP or JSON, including example code
- Scaffolding a custom testimonial block with the create-guten-block utility using Node JS
- Building out the scaffolded testimonial block with React and JSX with extensive code examples
- Approach to defining attributes and adding inspector controls for the scaffolded block
- Closes with an interesting discussion about the need for a server-side Gutenberg API and existing solutions to improve the developer experience.
Takeaways:
There’s something for everyone in this tutorial, which makes it a great resource for WordPress developers on any level! Notably, the tutorial does a fantastic job of contrasting what it looks like to register a block using something like Advanced Custom Fields – a very turn-key, PHP-based solution – vs using full-blown scaffolding and further development with React and JSX. Nice job on this one, Jason!