Custom Theme
In this guide, we will show you the simple steps to generate the final CSS file for your activated custom theme.
If the activated custom theme uses the standard WordPress hooks wp_head
on the template, the Play CDN or the cached CSS file will be loaded automatically on the front end.
Add the following code to your theme’s functions.php
file or a Snippet plugin.
Step 1: Adding the Compiler’s scanner
Section titled Step 1: Adding the Compiler’s scannerTo tell Yabe Siul’s compiler to scan your custom theme, you need to add a custom scanner to the compiler. This scanner will be responsible for scanning your custom theme and returning the data to the compiler.
Step 2: Adding the Compiler’s scanner callback
Section titled Step 2: Adding the Compiler’s scanner callbackNow that we have added the scanner, we need to define how the scanner will scan the custom theme and return the data to the compiler.
Now that we have added the scanner and the scanner callback, we can now generate the final CSS file for your custom theme.