Working with assets is pretty simple in WordPress. You have two hooks where you call the enqueue functions and that’s it. But what if you want to load the styles or script on just particular pages or only when a widget or shortcode is called? In this tutorial, we will build an asset manager for your WordPress plugin which you can utilize.
Tag: javascript
How to create a Gutenberg Block for Displaying a Post
Gutenberg is coming and we need to be prepared for it. In this tutorial, we will learn how to create a block that will display a post.
How to create a Repeater Field with wp.template()
Learn how to create repeater fields for your WordPress settings pages with wp.template(). That is a WordPress Underscore.js JavaScript method for getting an HTML template and passing data to it. In this tutorial, I will show you how to use wp.template() to create a repeater field.
How to Optimize the Divi Gallery Module
Divi theme is a great theme for people who aren’t tech-savvy. The Divi Gallery Module is a module where you can create galleries with a slideshow effect. If you have many images in one or more galleries on a page, that page will have a lot of images that load without being seen. In this tutorial, I’ll show you how to optimize the Divi Gallery Module with a few code snippets.
How to Create a WordPress Rating Plugin for Your Content – Part 2
In this second tutorial we will create the styles and scripts for our WordPress Rating Plugin. It requires those to function and display properly on each page, post or any content type for which we have decided to get ratings.