Create and preload stylesheets

Seeing how modular style sheets are called at individual template level, one of the first questions you may have is, “how do I hook into this feature and add my own custom, modular style sheets?”

Conditional preloading of stylesheets can be used to improve the performance of the theme.

Say for example, you want to create a stylistic change that only appears on single pages, using the page.php template.

The first thing to know is that WP Rig only uses one template file out of the box: index.php, which is used to display everything. (The front page, whole pages, archives, everything is run off index.php.)

However, if you go into the WP Rig files, you’ll see there’s a folder called “optional” that contains optional template files you can use if you want to.

This video will give you instructions on how to use those template files, and how to set up stylesheets that -only- apply to those templates.

(Note: The plugin referred to in this video is “Show Current Template”. To download it, go here:

More from this course: