Worpress
How To Create A Masonry Layout With Css Columns
What it is: a masonry layout places items of different heights in tight columns with no empty gaps, like a Pinterest board. Native CSS masonry is still in development and…
How To Load Custom Fonts With Css @Font-Face And Font-Display
Hosting fonts on your own server is faster, avoids third party requests and helps with privacy rules. Use @font-face to register the font and font-display to control how text shows…
How To Enqueue A Javascript File In The WordPress Admin
Use the admin_enqueue_scripts hook to load JS in the dashboard. The $hook parameter lets you limit the script to specific admin screens.
How To Register A Gutenberg Block With Plain Javascript In WordPress
You can register a simple block without a build step. Load the script in the editor with the enqueue_block_editor_assets hook and declare the WordPress packages as dependencies.
How To Use The WordPress Rest Api With Javascript Fetch
Expose the REST root URL and a nonce with wp_localize_script(), then call any endpoint from JS.


