Tag load
How To Use Css Aspect-Ratio To Keep Image And Video Proportions
The aspect-ratio property sets the proportion between width and height. It removes the old padding hack and prevents layout shift while images and videos load, which helps your Core Web…
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 Lazy Load Background Images In WordPress With Intersectionobserver
WordPress already adds loading="lazy" to images. Use IntersectionObserver for things the browser cannot lazy load by itself, like CSS background images.
How To Enqueue A Javascript File In WordPress
Use wp_enqueue_script() inside the wp_enqueue_scripts hook to load your JS file the right way.


