How to add JSON-LD Schema to Wix Studio Dynamic Item Pages (SEO Settings vs Code)

We’ve all been there: You build a stunning Dynamic Item Page using the Wix CMS—maybe for a Real Estate listing, a Job Board, or a Team Member profile. The design is perfect, but when you check Google, the search result looks… plain.

You want those “Rich Results”—the star ratings, the salary range, the event dates. The things that help drive clicks.

Note: If you’re using Wix Apps (Stores, Bookings, Events etc.), you’ll find SEO settings for each within your site dashboard. This guide is specifically for Dynamic Item Pages created with the CMS.

Here are the two ways to handle this in Wix Studio, depending on the level of control you need.


Method 1: Via your site SEO tools

Best for: Straightforward Custom Collections (Job Boards, Recipes, Team Bios)

Before using custom code, check if the Dashboard meets your requirements. Wix Studio allows you to map CMS fields directly to Schema markup visually.

This is the preferred method for most standard use cases because it keeps your SEO settings centralized within the dashboard, rather than split across page code and SEO settings.

How to do it:

  1. Go to SEO Settings in your Dashboard.
  2. Find the “Edit by Page Type”, and locate your Dynamic Page (e.g., Jobs Posting (Item))
  3. Click Edit next to “Structured data markup”.
  4. Click “+ Add New” and paste your JSON-LD template
  5. Highlight the placeholder text (like “Job Title”) and click “+ Add Variable”. You can now select the exact field from your CMS collection (e.g., Title, Description, Company Logo) to populate the tag dynamically.

Learn more: Working with SEO Settings for Dynamic pages


Method 2: The Code Way

Best for: complex logic, conditional Schema, and finer control

Sometimes you need your Schema to react to specific conditions rather than just mapping static fields.

  • Job Boards: “If the application deadline has passed, explicitly tell Google the job is closed.”
  • Recipes: “Only include the ‘AggregateRating’ object if the recipe actually has reviews.”

For this, we’ll enable Code on our site, and start coding.

We need to nest our logic inside the dataset’s onReady function to ensure the data actually exists before we try to set our Schema.

Example: Dynamic Job Posting Schema

import * as wixSiteSeo from '@wix/site-seo';
import * as wixSiteLocation from '@wix/site-location';

$w.onReady(function () {

    // 1. Wait for the Dynamic Dataset to fully load
    $w("#dynamicDataset").onReady(async () => {

        // 2. NOW it is safe to grab the current item from your CMS
        const itemObj = $w("#dynamicDataset").getCurrentItem();

        // 3. Define variables safely
        // Ensure these match the Field Keys in your CMS exactly
        const jobTitle = itemObj.jobTitle;
        const url = await wixSiteLocation.location.url();
        const companyName = itemObj.companyName;
        const datePosted = itemObj.datePosted;
        const validThrough = itemObj.validThrough; // Date field in CMS

        // 4. Apply the JSON-LD
        wixSiteSeo.seo.setStructuredData([{
            '@context': 'https://schema.org/',
            '@type': 'JobPosting',
            'title': jobTitle,
            'url': url,
            'datePosted': datePosted,
            'validThrough': validThrough,
            'description': itemObj.jobDescription, // Must be HTML or text
            'hiringOrganization': {
                '@type': 'Organization',
                'name': companyName,
                'logo': itemObj.companyLogo // URL from CMS image field
            },
            'jobLocation': {
                '@type': 'Place',
                'address': {
                    '@type': 'PostalAddress',
                    'addressLocality': itemObj.city,
                    'addressRegion': itemObj.region,
                    'addressCountry': itemObj.country
                }
            },
            'employmentType': 'FULL_TIME', // Can also be mapped dynamically
            'baseSalary': {
                '@type': 'MonetaryAmount',
                'currency': 'USD',
                'value': {
                    '@type': 'QuantitativeValue',
                    'value': itemObj.salary,
                    'unitText': 'YEAR'
                }
            }
        }]);

        console.log("Job Schema Injected for: " + jobTitle);
    });
});

SDK Documentation:


:graduation_cap: New to coding? Check out the Start Coding on Wix Studio tutorial in the Academy.


Which one should you choose?

  • Method 1 (Dashboard) is ideal when you simply need to populate Schema tags with existing content from your CMS.
  • Method 2 (Code) is required when you need to manipulate that data or apply logic before applying the schema.
2 Likes