|
/ Documentation /Schema/ Custom JSON-LD Schema in SureRank

Custom JSON-LD Schema in SureRank

This Feature Is Part of Pro Plan

The Custom JSON-LD Schema feature lets advanced users and developers add raw structured data directly to their site, no separate plugin needed. Instead of using SureRank’s guided field-based schema editor, you can paste any valid JSON-LD code, and SureRank will output it through its standard schema pipeline, alongside all other schema types.

This is ideal for:

  • SEO professionals who generate schema code using AI tools or schema generators.
  • Developers who need to add schema types not yet available as native SureRank fields.
  • Complex schema types like multi-entry FAQ where entering each field manually would be slow

Before You Begin

This feature is hidden by default and must be enabled. Add the following filter to your theme’s functions.php file or a custom plugin:

add_filter( 'surerank_pro_enable_custom_json_ld_schema', '__return_true' );

Once this filter is in place, the Custom JSON-LD option will appear as a schema type in both the post editor and the main schema builder

Adding Global Custom JSON-LD Schema

You can also create a Custom JSON-LD schema that applies across multiple pages using display conditions.

  1. Go to SureRank and then Schema
  2. Click Add Schema and select Custom JSON-LD
  3. Enter a Schema Title for internal reference
  4. Paste your JSON-LD code
  5. Click the Display Conditions tab and configure where the schema should appear
  6. Click Save

Example: FAQ Schema

{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "What is SureRank?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "SureRank is a WordPress SEO plugin built for speed and simplicity."
      }
    },
    {
      "@type": "Question",
      "name": "Does SureRank support schema markup?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Yes. SureRank supports multiple schema types including FAQ, Article, Product, and more."
      }
    }
  ]
}

Display Conditions

Display conditions follow the same logic as other SureRank schema types. Use them to control where a global schema appears across your site.

FieldDescriptionRequired
Display OnPages or post types where this schema should appearYes
Do Not Display OnSpecific pages to excludeNo

If no display conditions are matched, the schema will not be printed on the frontend.

Adding Page Level Schema

  1. Open the post or page in the WordPress editor
  2. Click on the SureRank Icon
  3. Click the Schema tab
  4. Click Add Schema and search for Custom JSON-LD
  5. Enter a Schema Title (this is an internal label and is not published)
  6. Paste your JSON-LD code into the editor field
  7. Click Save

Validation

SureRank validates your JSON-LD before saving. If the code is invalid, a clear error message will appear indicating the issue, and the schema will not be published. If a previously saved schema becomes invalid, SureRank will skip it during frontend rendering without breaking your page.

To verify your schema is working correctly after saving, use the Google Rich Results Test or the Schema Markup Validator.

Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

Need help? Contact Support
Table of Contents
Scroll to Top