Tag: Javascript

How to Properly Modify JavaScript Files in a Parent Theme

javascript wordpress

I recently needed to modify a JavaScript file in a WordPress parent theme. The script was doing almost what I wanted, but not quite, so I wanted to make minor changes. In your case, you might want to entirely override a parent theme JavaScript file in your child theme, or even deactivate a parent theme JavaScript file altogether.


The Four Languages You Must Know to Understand WordPress

WordPress Programming Language Book

Learning WordPress development starts with a lot of key questions, including this one: “What language is WordPress written in?” Another common one is “Should I learn PHP or JavaScript first?” WordPress programming languages is a big topic, but we’ll cover all you need to get started.






Minify CSS and JS with Autoptimize

A common piece of advice when it comes to optimizing the browser performance of your website is to concatenate and minify your CSS and JavaScript. There are many reasons and place you’ll see this recommended but Google PageSpeed Insights was the one that spurred me to action. And for me, I settled on a WordPress plugin called “Autoptimize” to make it easier for me to do it on this site. Autoptimize, if it’s not obvious, is a combination of the words “automatic” and “optimize”, and that’s just what it is, easy optimization of thing that are hard for non-developers to do.


How to Conditionally Enqueue a JavaScript File in WordPress

Enqueuing is the WordPress way to add a stylesheet or JavaScript file on a page. We already published a Quick Guide about including your JavaScript in WordPress. This time, though, we’re adding an extra wrinkle: how do you only enqueue a JavaScript file on certain pages of your WordPress site. That’s the focus of this here Quick Guide.