How to Add JavaScript and CSS to Gutenberg Blocks the Right Way in Plugins and Themes

How to Add JavaScript and CSS to Gutenberg Blocks the Right Way in Plugins and Themes

While working on my Gutenberg Editor Development Course I had a simple question early on: "How do I enqueue my block JavaScript and CSS to work with the Gutenberg Editor?" The short answer is there are two ways: enqueue_block_editor_assets - For enqueueing JavaScript and CSS in the admin editor only. enqueue_block_assets - Enqueues on both the frontend of the site … Continue reading How to Add JavaScript and CSS to Gutenberg Blocks the Right Way in Plugins and Themes

A Great Series on WordPress Coding Standards

Thanks to core contributor, Tom McFarlin, for writing up this great series of posts on WP Tuts+ dissecting the recommended coding standards for WordPress theme and plugin development. The WordPress Coding Standards: An Introduction The WordPress Coding Standards: Naming Conventions and Function Arguments The WordPress Coding Standards: Single Quotes and Double Quotes The WordPress Coding … Continue reading A Great Series on WordPress Coding Standards