Currently browsing category: JavaScript

Say you have JavaScript files that rely on images that live in your current theme directory — or elsewhere outside of the domain root — and they’re not loading without hard-coding the URL into your code. Or, you may be developing locally and when pushing to a sandbox or production server, tired of changing the file path depending on the server. You must register the script before calling wp_localize_script() then queueing it. This allows you to […]

Continue Reading …
JavaScript WordPress

I was in desperate need for a functioning yet robust, and most importantly, quick-to-install-and-deploy carousel/slider for a large project i was working on for my job. Perusing my job’s rival-of-sorts website, i dove into their code and learned they used Flickity, which i instantly fell in love with after reading its documentation and API. Several ways to install and to call the carousel. With its built-in options and reliance on CSS, it was easy peasy to […]

Continue Reading …
JavaScript