FlexPlat logoFlx Modernize

Tutorial: building a theme renderer, the Twenty Twenty-Five way

This tutorial walks through how the Twenty Twenty-Five renderer was built, in the order it was built, so you can repeat the process for another theme. Every step names the real files in the renderer package, a check that proves the step works, and the result it had on Twenty Twenty-Five.

You need: the Flx Modernize plugin, the Twenty Twenty-Five renderer package, Node.js 22, PHP 8, a GitHub account (the checks run on GitHub Actions), and a disposable WordPress test site. Never measure or experiment on a live site.

Step You will Fidelity after (desktop / phone)
1. Measure first compare native and Flx pages pixel by pixel baseline 60.6% / 58.3%
2. Connect plugin and renderer run both, signed, on a throwaway WordPress —
3. Use the theme's own CSS inline the theme's global styles and fonts (part of the baseline)
4. Header and footer reproduce the theme's template parts 70.1% / 69.6% after the footer
5. Post lists reproduce the query loop 75.4% / 72.5%
6. Special templates reproduce a fixed template (the 404) 80.9% / 77.4%
7. Safety checks prove who gets Flx and what is cached —
8. Go live deploy, verify, and keep a one-command rollback —
9. Restyle in Tailwind replace WordPress's stylesheet with the renderer's own Tailwind CSS 94.2% / 90.9%
10. Edge caching let the CDN share anonymous pages, purge on change —
11. Closing the last gaps add payload fields (More posts, post details, sub-menus) and WordPress-rendered comments 98.9% / 97.3%; posts 99.9% / 99.6%

The header (step 4) moved the score only from 75.4% to 76.1%, but it lined up every page below it.

The second demo: a WooCommerce store on Storefront

Steps 12 to 17 do it again for a classic theme running a store, where the middle of each page comes from WooCommerce's own templates and some pages hold personal data. For these you need the Storefront renderer package.

Step You will Result
12. What changes with a store see the differences, and set up the test site —
13. Catalogue pages send the shop, categories, products and home through Flx 99.9% / 99.7%
14. Shoppers with a cart keep them on Flx, with no cart data sent pages byte-identical to a no-cart visitor's
15. Sections in TypeScript let a theme replace product cards and product pages a new design, with add to cart working
16. Cart, Checkout, My account carry the design around WooCommerce's forms a real order placed through it in CI
17. Go live, and your own store deploy, and see what carries over to another store —

Converting a client's site? The tutorial explains the techniques; the site conversion checklist gives the order to apply them in.

The one idea behind every step

Render the theme's own markup and let the theme's own CSS style it first. WordPress already computes the theme's complete stylesheet (global styles), and the plugin hands the renderer a link to it. If the renderer outputs the same block markup the theme uses (wp-block-group, wp-block-navigation, has-global-padding, …), that stylesheet styles it exactly as on a native page. Once the markup matches, step 9 replaces that stylesheet with the renderer's own Tailwind CSS, measured against the same gate, with the old way kept as a rollback.

How the steps are verified

Each change goes through the same loop: branch → CI run (fidelity score + safety check) → pull request → merge → automatic deploy → live check. The fidelity gate fails the CI run if the score drops, so a step can only move forward.

Published from rickey29/twenty-twenty-five at commit 72c5424 · Flx Modernize 1.14.0 · Flx Render 1.14.0