
Using LLMs to Generate Structured Data for WordPress (Not HTML)
Most tutorials about AI + web development show the same pattern: give the LLM a prompt, get back HTML, paste it somewhere. It works for prototypes. It breaks in production. I've been building a system that generates full WordPress sites from text descriptions. Early on, I made the obvious choice: have the AI generate HTML. It took about two weeks to realize that was a terrible idea. Here's what I learned, and the architecture I ended up with instead. Why generating HTML is a trap When you ask an LLM to generate a web page, it produces markup. Something like: <div class= "hero-section" style= "background: #1a1a2e; padding: 80px 40px;" > <h1 style= "color: white; font-size: 48px;" > Artisan Gelato </h1> <p style= "color: #ccc;" > Handcrafted flavors since 1987 </p> <a href= "/menu" class= "btn" style= "background: #e63946;" > View Menu </a> </div> Looks fine. Now try to: Edit it with a visual editor. Elementor, Gutenberg, or any page builder will choke on inline styles and non-standard c
Continue reading on Dev.to Webdev
Opens in a new tab

