Structured data on Wix dynamic pages using variable-driven schema
Module 57: Wix Dynamic Pages: Advanced SEO for Data-Driven Sites | Lesson 618 of 687 | 38 min read
By Michael Andrews, Wix SEO Expert UK
Static JSON-LD schema on a dynamic page produces the same schema markup on every URL, regardless of the unique content of each record. This defeats the purpose of structured data. Variable-driven schema uses Wix CMS field values to populate schema properties dynamically, so each page has unique, accurate structured data that reflects its specific content.
Why Static Schema Fails on Dynamic Pages
If you add a JSON-LD block with a fixed product name and price to a dynamic product page template, every product page on your site will report the same product name and price to Google. This is not just inaccurate — it can cause rich result failures because Google detects the mismatch between the schema data and the visible page content. Dynamic pages require dynamic schema.
Using Wix Variables in Custom Code Schema Blocks
Implementing variable schema on Wix dynamic pages
- Open your dynamic page in the Wix Editor
- Add a Custom Code block in the head section
- Write your JSON-LD schema with placeholder variable syntax for dynamic values
- Use Wix Velo code to populate the schema with actual field values from the current record
- Test the implementation by viewing source on published dynamic pages to verify unique schema output
- Validate using Google Rich Results Test on multiple different dynamic page URLs
Example: Product Schema with Dynamic Field Values
// Wix Velo code in dynamic page to inject product schema
import wixLocation from 'wix-location';
import { currentItem } from 'wix-dataset';
$w.onReady(function () {
const item = $w('#dynamicDataset').getCurrentItem();
const schema = {
"@context": "https://schema.org",
"@type": "Product",
"name": item.title,
"description": item.description,
"offers": {
"@type": "Offer",
"price": item.price,
"priceCurrency": "GBP",
"availability": "https://schema.org/InStock"
}
};
// Inject via Velo or custom element
});
This lesson on Structured data on Wix dynamic pages using variable-driven schema is part of Module 57: Wix Dynamic Pages: Advanced SEO for Data-Driven Sites in The Most Comprehensive Complete Wix SEO Course in the World (2026 Edition). Created by Michael Andrews, the UK's No.1 Wix SEO Expert with 14 years of hands-on experience, 750+ completed Wix SEO projects and 425+ verified five-star reviews.