How WP Rig works

WP Rig’s file structure is different from the typical WordPress theme, but has recognizable pieces, like styles.css, sidebar, screenshot, header, footer, functions and so on. There are also new pieces.  That is because WP Rig is not a starter theme — it is a theme development rig, meaning it is an entire toolkit used to build a theme. In short, WP Rig is a re- imagining of how WordPress themes work, and how they should be developed.

As you work with WP Rig, you’ll work on these files and in these folders. If you’ve used Version 1 of WP Rig, pretty much everything is new. Most notably, the “dev” folder is gone, and you now work directly on the PHP, CSS and JavaScript files in the root.

WP Rig is two things built into one convenient package: a starter theme, which you’ll be working on; and a build process that runs in the background, fixing and optimizing your code. As you work on the PHP, CSS and JavaScript files in WP Rig, the build process watches for changes, alerts you when something is not right, helps you fix your code, generates optimized versions of your code, and syncs with your browser to always show you the latest version of your code. All in the background.

When you’re done and your theme is ready to be published to a custom site (or the WordPress theme directory or a marketplace of your choosing) you’ll run an export process to generate a new folder with just the necessary theme files. That means you can generate as many different themes as you want from one single WP Rig instance.

But, it is recommended to set up separate environments for each theme you build. The beauty of WP Rig is, you don’t have to know what’s going on in the build process, unless you really want to. The build process is built to be updated, and configurable and easy to understand. (You can find it in the Gulp folder if you want to take a look.)

But for most users, you don’t have to worry about it. WP Rig lets you focus on what you do best, which is building accessible, modern, progressive PHP, CSS and JavaScript. That’s done right in the files and folders in the root folder. And that’s we will be exploring in great detail in this course.

More from this course: