How to add JSON-LD schema markup to any Wix page using Custom Code

Module 6: Technical SEO, Structured Data & Rich Snippets for Wix | Lesson 67 of 688 | 50 min read

By Michael Andrews, Wix SEO Expert UK

This is the most technically important lesson in the entire course. Every structured data type covered in subsequent lessons relies on this foundation: how to add JSON-LD code to your Wix site using the Custom Code feature. Master this process once, and you can implement any schema type on any page of your Wix site. This lesson covers the step-by-step process, site-wide vs page-specific deployment, common errors and fixes, advanced techniques like nesting multiple schema types, and a troubleshooting guide for when things go wrong.

How-to diagram showing technical SEO elements including JSON-LD structured data markup, schema types, site speed optimisation, and rich snippet results in Google
Technical SEO and structured data transform how Google displays your Wix site in search results with rich snippets and enhanced listings.

Finding Custom Code in Wix

Navigate to Custom Code in Wix

Site-Wide vs Page-Specific Schema

Understanding when to use site-wide vs page-specific deployment is critical. Using the wrong scope wastes schema potential or creates errors.

Adding Your First JSON-LD Block

Step-by-step: adding schema to Wix

The JSON-LD Template Structure

<!-- Basic structure -->
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Organization",
  "name": "Your Business Name",
  "url": "https://www.yourdomain.com"
}
</script>

<!-- With nested objects -->
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "LocalBusiness",
  "name": "Your Business",
  "address": {
    "@type": "PostalAddress",
    "streetAddress": "123 Your Street",
    "addressLocality": "Your City",
    "postalCode": "AB1 2CD"
  }
}
</script>

<!-- With arrays -->
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Organization",
  "name": "Your Business",
  "sameAs": [
    "https://facebook.com/yourbusiness",
    "https://linkedin.com/company/yourbusiness",
    "https://twitter.com/yourbusiness"
  ]
}
</script>

Combining Multiple Schema Types on One Page

Many pages benefit from multiple schema types. A service page might have Organization schema (site-wide) plus FAQPage schema (page-specific) plus BreadcrumbList schema (page-specific). You have two options for combining:

Option 1: Separate Script Blocks (Recommended)

Add each schema type as a separate <script> block. This is cleaner, easier to maintain, and easier to debug. Each block is independent.

Option 2: @graph Array

Combine multiple schema types in a single <script> block using the @graph property. This is more advanced but creates explicit relationships between entities.

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@type": "Organization",
      "name": "Your Business"
    },
    {
      "@type": "FAQPage",
      "mainEntity": [
        {
          "@type": "Question",
          "name": "Your question?",
          "acceptedAnswer": {
            "@type": "Answer",
            "text": "Your answer."
          }
        }
      ]
    }
  ]
}
</script>

Troubleshooting Common Errors

Syntax Errors

Rich Results Test Errors

Schema Not Appearing After Publishing

Debugging missing schema

Schema Management Best Practices for Wix

Using Schema Generators vs Writing Code Manually

Final Checkpoint: Every schema snippet should pass the Rich Results Test with zero errors before publishing. After publishing, verify the live URL passes the test. Check Google Search Console Enhancements within a week to confirm Google has detected your schema. If errors appear, fix the code and republish immediately.

This lesson on How to add JSON-LD schema markup to any Wix page using Custom Code 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.