Codex
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 Create A Load More Posts Button With Ajax In WordPress
Load the next page of posts without reloading the page. This example requires the lotgrafixData object from the wp_localize_script() post.
How To Add A Back To Top Button In WordPress
Show a button after scrolling down and scroll smoothly back to the top when it is clicked.
How To Make A Sticky Header On Scroll In WordPress
Add a class to the header after the user scrolls, then style it with CSS. Replace .site-header with your theme header selector.


