Scalable structured data: updating all pages of the same type in one action
Module 6: Technical SEO, Structured Data & Rich Snippets for Wix | Lesson 93 of 688 | 28 min read
By Michael Andrews, Wix SEO Expert UK
When your Wix site has hundreds of pages of the same type, manually updating structured data on each is not viable. Scalable structured data methods let you apply schema once and have it populate correctly across every product, blog post, event or service page automatically.
Method 1: Wix SEO Patterns for Schema Templates
The most accessible scalable method is Wix SEO Patterns combined with Wix's automatic structured data generation. For supported page types (Products, Blog Posts, Events), Wix already generates appropriate schema automatically using page data. Ensure your page data fields are complete and accurate — the schema quality depends entirely on the data quality in your Wix dashboard.
Method 2: Site-Wide Custom Code Placement
- Wix Custom Code can be set to load on "All Pages" rather than a specific page
- Use JavaScript to detect the page type from document title, URL pattern or body class
- Conditionally render different JSON-LD schema based on detected page type
- This approach works for schema that applies to every page of a type
- Test across multiple pages to ensure conditional logic fires correctly
Method 3: Wix Velo for Database-Driven Schema
Using Velo to generate schema from database collections
- Enable Velo Dev Mode in your Wix editor
- In the page code for a dynamic page template, import wixSeo
- Fetch the current item data from the page's dataset using $w("#dataset").getCurrentItem()
- Build a JSON-LD object dynamically using the fetched data fields
- Use wixSeo.setStructuredData() to inject the schema into the page head
- Test on multiple items in the collection to verify schema accuracy
Updating Schema at Scale When Requirements Change
When Google updates its rich result requirements (as it does periodically), updating scalable schema requires editing one template or one Velo script rather than hundreds of pages. This is the primary advantage of the scalable approach over per-page manual schema. Keep a record of where each schema type is implemented on your Wix site so you can update quickly when Google's documentation changes.
How to Apply a Schema Template to All Pages of a Type Using Wix Custom Code
How to implement scalable structured data across all Wix pages of the same type using Custom Code
- Open your Wix Dashboard and navigate to Settings > Custom Code.
- Click Add Custom Code to create a new code block.
- Set the placement to Head and the loading time to Load once — page fully loads.
- In the Load on field, select All Pages to apply the code across your entire Wix site.
- In the code editor, write a JavaScript conditional that detects the current page type using the document URL pattern. For example, use window.location.pathname.includes('/blog/') to detect blog pages.
- Inside the conditional block, create a JSON-LD object containing the schema properties relevant to that page type, using document.title to populate the name field dynamically.
- Use document.querySelector to pull additional data from visible page elements where needed, such as the article date or author name.
- Create a script element using document.createElement('script'), set its type to "application/ld+json", and set innerHTML to JSON.stringify() of your schema object.
- Append the script element to document.head using document.head.appendChild() to inject the schema into the page.
- Test the implementation by opening a blog post or product page on your live Wix site, pasting the URL into the Google Rich Results Test, and confirming the schema is detected without errors.
This lesson on Scalable structured data: updating all pages of the same type in one action is part of Module 6: Technical SEO, Structured Data & Rich Snippets for Wix 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.