Tag main
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.
How To Create A Mobile Menu Toggle In WordPress With Javascript
A simple accessible toggle that opens and closes a menu on mobile.
How To Add A Copy To Clipboard Button In WordPress
Use the navigator.clipboard API to copy any text with a single click. It requires HTTPS.
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.


