Skip to content
Protocols

Schema.org JSON-LD for AI Visibility — WordPress Structured Data

6 min read


Schema.org JSON-LD for AI Visibility

Why This Matters

When ChatGPT, Perplexity, or Google’s AI Overview answers a question, they don’t just read your text — they parse your structured data first. Schema.org markup tells them exactly who published your content, when it was last updated, and what topics it covers. Without structured data, your content is anonymous text competing with millions of other anonymous pages.

Most WordPress sites either ship no JSON-LD at all or rely on basic SEO plugin schemas that lack the signals AI systems look for. Citelayer® generates comprehensive Schema markup designed specifically to make your content identifiable, attributable, and quotable.

How It Works

Citelayer® injects a <script type="application/ld+json"> block into your page’s <head> section using WordPress’s wp_head hook at priority 1. This ensures the structured data loads before any other plugin’s output.

Every injected block is preceded by a comment marker for easy identification:

<!-- Citelayer® Schema.org Markup -->
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@graph": [ ... ]
}
</script>

Citelayer® generates three schema types, all wrapped together in a single @graph array:

Organization Schema

Represents your site as a recognized entity. This tells AI systems who is behind the content — critical for attribution and trust signals.

{
  "@type": "Organization",
  "name": "Your Site Name",
  "url": "https://example.com",
  "description": "Your site tagline",
  "logo": {
    "@type": "ImageObject",
    "url": "https://example.com/wp-content/uploads/site-icon.png"
  },
  "knowsAbout": ["WordPress", "SEO", "Content Strategy"],
  "expertise": ["Technical SEO", "Structured Data"],
  "sameAs": [
    "https://twitter.com/yourhandle",
    "https://linkedin.com/company/yourcompany",
    "https://github.com/yourorg"
  ]
}

The logo pulls from your WordPress Site Icon (set under Settings → General or Appearance → Customize → Site Identity). The knowsAbout and expertise fields come from Citelayer®’s admin settings. Social profiles populate the sameAs array.

WebSite Schema

Describes your site as a searchable resource, including a SearchAction that AI systems and search engines use to understand your site’s search functionality.

{
  "@type": "WebSite",
  "name": "Your Site Name",
  "url": "https://example.com",
  "potentialAction": {
    "@type": "SearchAction",
    "target": {
      "@type": "EntryPoint",
      "urlTemplate": "https://example.com/?s={search_term_string}"
    },
    "query-input": "required name=search_term_string"
  }
}

Article / BlogPosting Schema

Generated on individual posts and pages. Citelayer® uses BlogPosting for posts and Article for pages — matching what Google’s documentation recommends.

{
  "@type": "BlogPosting",
  "headline": "Your Post Title",
  "url": "https://example.com/your-post/",
  "datePublished": "2025-01-15T10:30:00+00:00",
  "dateModified": "2025-02-01T14:22:00+00:00",
  "author": {
    "@type": "Person",
    "name": "Jane Author",
    "url": "https://example.com/author/jane/"
  },
  "publisher": {
    "@type": "Organization",
    "name": "Your Site Name",
    "logo": {
      "@type": "ImageObject",
      "url": "https://example.com/wp-content/uploads/site-icon.png"
    }
  },
  "description": "The post excerpt goes here...",
  "image": "https://example.com/wp-content/uploads/featured-image.jpg"
}

The description uses your post excerpt. The image pulls from the featured image. If either is missing, the field is omitted rather than filled with placeholder content.

REST API Endpoints

Citelayer® exposes three public REST endpoints so you can inspect, debug, or consume schema data programmatically:

# Full schema graph (all types combined)
GET /wp-json/citelayer/v1/schema

# Organization schema only
GET /wp-json/citelayer/v1/schema/organization

# WebSite schema only
GET /wp-json/citelayer/v1/schema/website

All three endpoints are public — no authentication required (permission_callback: __return_true). They return JSON with a 200 status code under normal conditions.

If Citelayer® detects a multi-family SEO plugin conflict, these endpoints return HTTP 503 Service Unavailable instead of schema data. This prevents serving potentially incorrect structured data when the SEO environment is unstable.

Configuration

Configure schema output from the Citelayer® settings page in your WordPress admin:

Organization Fields

  • knowsAbout — Enter topics as a comma-separated list. Example: WordPress, Technical SEO, Content Strategy, Schema.org
  • expertise — Enter specializations as a comma-separated list. Example: Structured Data Implementation, AI Visibility Optimization

Social Profiles

Add your profile URLs to populate the sameAs array in the Organization schema:

  • Twitter / X
  • LinkedIn
  • Facebook
  • Instagram
  • GitHub

Leave any field empty to exclude it. Only profiles with URLs appear in the output.

SEO Plugin Compatibility Mode

If you run a compatible SEO plugin, choose how Citelayer® interacts with it:

  • Enhance mode — Citelayer® adds its schema alongside your SEO plugin’s existing output. Use this when your SEO plugin already generates basic schema and you want Citelayer® to fill in the gaps (like knowsAbout, expertise, and richer Article markup).
  • Replace mode — Citelayer® takes full control of JSON-LD output and disables your SEO plugin’s schema generation. Use this when you want one consistent source of structured data.

Verification

Three ways to confirm your schema is working:

1. View Page Source

Open any page on your site, view the HTML source, and search for:

<!-- Citelayer® Schema.org Markup -->

You should see the comment followed immediately by a <script type="application/ld+json"> block containing your @graph array.

2. REST API

Visit https://yoursite.com/wp-json/citelayer/v1/schema in your browser. You get the full JSON-LD graph as raw JSON — easy to read, copy, and validate.

3. Google Rich Results Test

Paste your page URL into Google’s Rich Results Test. The tool parses your structured data and reports any errors or warnings. While this tool focuses on Google’s requirements, valid schema here also means valid schema for AI systems.

Technical Details

Caching

Citelayer® caches generated schema using WordPress transients. Each transient uses the prefix citelayer_schema_ and expires after 1 hour. This means the schema JSON is computed once and served from cache on subsequent page loads, reducing database queries and processing time.

The cache invalidates automatically when you:

  • Save or update a post (save_post hook)
  • Delete a post (delete_post hook)
  • Change your site title, tagline, or URL (update_option for blogname, blogdescription, siteurl, home)

You don’t need to clear the cache manually. Any content or settings change that affects schema output triggers an automatic refresh.

Filters for Developers

Citelayer® provides three filters to customize schema output programmatically. Each filter receives the schema array and (where applicable) the current post object:

// Modify Organization schema
add_filter( 'citelayer_organization_schema', function( $schema ) {
    $schema['foundingDate'] = '2020-01-01';
    $schema['numberOfEmployees'] = 25;
    return $schema;
} );

// Modify WebSite schema
add_filter( 'citelayer_website_schema', function( $schema ) {
    $schema['inLanguage'] = 'en-US';
    return $schema;
} );

// Modify Article/BlogPosting schema
add_filter( 'citelayer_article_schema', function( $schema, $post ) {
    $schema['wordCount'] = str_word_count( $post->post_content );
    $schema['articleSection'] = 'Technology';
    return $schema;
}, 10, 2 );

All filters run before the schema is cached, so your modifications are included in the cached output. See the Hooks & Filters reference for the complete list.

  • llms.txt — Make your content discoverable by large language models
  • WebMCP — Model Context Protocol server for direct AI integration
  • SEO Compatibility — Enhance vs. Replace mode details
  • Hooks & Filters — Full developer reference for all Citelayer® filters