πŸ“– Lesson 13 of 13

Tailoring Configurations & Theme Settings

In this final lesson, we will explore the underlying configuration parameters that define WP Rig’s development behaviors, design tokens, and production bundler.


1. Customizing Theme Meta

Under `config/config.json`, you define configuration settings that govern the overall theme name, directories, and assets:

{
  "theme": {
    "slug": "excalibur",
    "name": "Excalibur Theme",
    "author": "My Web Studio"
  }
}

During initialization or compilation, WP Rig dynamically parses this file to: * Perform global search-and-replace naming operations across files. * Update theme directory names. * Write appropriate comments and standard style metadata headers inside `style.css`.


2. Managing Design Tokens

WP Rig integrates design configurations inside `config/tokens.json` (or standard `theme.json`). This centralized file controls: * **Typography:** Registering custom web fonts, defining font weights, line-height scales, and letter spacing values. * **Colors:** Specifying your brand color palettes, theme backgrounds, and gradients. * **Layout Grid:** Declaring custom widths, gutter sizes, margins, and section padding systems.

By updating your properties inside this JSON index, your style compilers automatically lower these settings into **CSS Custom Properties** (`var(–color-primary)`) globally, allowing you to re-brand the theme visually in seconds!


3. Bundling for Production

Once development is complete and you are ready to upload your theme to a live staging or production environment, run:

npm run bundle

This command triggers a comprehensive production compilation sequence: 1. Compiles, minifies, and prefixes all CSS and Javascript source files, deleting source folders inside the production build. 2. Compresses and optimizes theme images (SVG, PNG, JPG). 3. Performs strict security checks on PHP classes. 4. Generates a clean, production-ready zip archive under `/artifacts/` named `[theme-slug].zip`.

You can upload this zip file directly to any production WordPress site via the native installer!


πŸŽ‰ Congratulations!

You have successfully completed the WP Rig v3 onboarding curriculum!

You are now equipped with the advanced knowledge required to build lighting-fast, standards-compliant, and AI-accelerated block-enabled themes. Keep this guide bookmarked for quick command lookups, and happy theme coding!