Tag: wp_enqueue_script
How to Include JavaScript Files on Your WordPress Site with wp_enqueue_script()


Want to know how to include a JavaScript file onto your WordPress site? In this Quick Quide we use an awesome WordPress function called wp_enqueue_script() that is the correct way to include JavaScript files in WordPress. Whether your JavaScript files are for Vue, React, JQuery, or something else, this is how you include JavaScript files in WordPress pages.
Adding Functionality with functions.php, a Heart of WordPress Theme Development


This article introduces one of the most important topics in WordPress development: functions.php. The functions file is one of the complex, interesting, and powerful in the arsenal of a WordPress theme. What follows
How to Use wp_enqueue_style to Load CSS Stylesheets


Stylesheets are at the heart of making HTML pages look good, in WordPress and the web. And the way that we make CSS stylesheets load into the page in WordPress is using the wp_enqueue_style function. It’s not too complicated, but there a few common places that people new to using it will get tripped up. This Quick Guide will cover those, and then get you running in a step-by-step guide.
How to Add JavaScript and CSS to Gutenberg Blocks


As Gutenberg gets closer, more and more people are trying to wrap their head around it. Zac Gordon’s Gutenberg development course is perfect if you’re really getting into it. But if you’re just looking into how to get started, this blog post he made a few months ago is as relevant and accurate as ever.
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.