WP Manifestindependent plugin directory
manifest / seo / hm-schema-block

Schema.org Blocks WP Registry grade A. No security issues foundWP RegistryNo security issues foundOpen the reportA

Composable schema.org graph tools for the block level

★ 2stars
144release downloads
v1.1.0latest · 19d ago

Install

Download schema-org-blocks.zip From the v1.1.0 release on GitHub, Oct 6, 2026

Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/humanmade/hm-schema-block/releases/download/v1.1.0/schema-org-blocks.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

A WordPress plugin that extends all blocks with schema.org type mapping and structured data output.

Open in WordPress Playground

Features

  • 🎯 Universal Block Extension: Adds schema.org mapping to all WordPress blocks
  • 🔗 Block Context Support: Blocks can provide and consume schema types from parent/child relationships
  • 🎨 Smart Defaults: Automatic mapping for common blocks (image, button, heading, paragraph)
  • 🌳 Hierarchical Types: Support for nested schema types (e.g., Place > Accommodation > Room)
  • 🔄 Flexible Property Mapping: Map block attributes or content to schema properties
  • 🚀 Yoast SEO Integration: Extends Yoast's schema output when available
  • 📊 JSON-LD Fallback: Automatic JSON-LD output when Yoast is not installed

Installation

  1. Clone this repository to your WordPress plugins directory:

    cd wp-content/plugins
    git clone https://github.com/humanmade/schema-org-blocks.git
    cd schema-org-blocks
  2. Install dependencies:

    npm install
    composer install
  3. Build the plugin:

    npm run build
  4. Activate the plugin in WordPress admin.

Development

Local Development with wp-env

Start the development environment:

npm run env:start

Start the build watcher:

npm start

Access your development site at http://localhost:8888

Testing

Run Playwright e2e tests:

npm run test:e2e

Watch mode for tests:

npm run test:e2e:watch

Code Quality

Lint JavaScript:

npm run lint:js

Format JavaScript:

npm run format:js

Usage

Basic Schema Type Mapping

  1. Edit any post or page in the block editor
  2. Select a block (e.g., a Group or Container block)
  3. In the block inspector, open the "Schema.org Mapping" panel
  4. Select a schema type (e.g., "Article", "Organization", "Place")
  5. Configure attribute mappings to map block attributes to schema properties

Hierarchical Schema Types

When a parent block has a schema type, child blocks can:

  1. Inherit the parent type: Leave schema type empty to use parent's type
  2. Narrow down to a subtype: Select a valid subtype (e.g., Accommodation → Room)
  3. Map as a property: Set the block as a specific property of the parent schema object

Smart Defaults

The plugin automatically configures common blocks when they're nested within a block that has schema context:

  • core/image: Auto-maps to image property as ImageObject
  • core/button: Auto-maps to url properties
  • core/heading: Auto-maps to headline or name properties
  • core/paragraph: Auto-maps to description, text, or articleBody properties

Example: Article with Schema

Group (Article)
├── Heading (→ headline property)
├── Paragraph (→ articleBody property)
├── Image (→ image property as ImageObject)
│   ├── URL → contentUrl
│   ├── Caption → caption
│   └── Dimensions → width/height
└── Button (→ url property)

Complex Property Mapping

For properties that can accept multiple types (e.g., image can be ImageObject or URL):

  1. Child blocks can be set as the property itself
  2. If the property type is a complex object (like ImageObject), map child block attributes to that object's properties
  3. If the property type is simple (like URL), map directly to that value

Schema Types

The plugin includes comprehensive schema.org type definitions including:

  • Creative Works: Article, BlogPosting, NewsArticle, CreativeWork
  • Organizations: Organization, LocalBusiness
  • People: Person
  • Places: Place, Accommodation, Room
  • Products: Product
  • Events: Event
  • Media: ImageObject, MediaObject
  • Structured Values: PostalAddress, GeoCoordinates, Offer, Review, Rating

All types support inheritance, so properties from parent types are automatically available.

Extending the Plugin

Adding Custom Schema Types

Use the schema_org_blocks_types filter:

add_filter( 'schema_org_blocks_types', function( $types ) {
    $types['CustomType'] = [
        'label' => 'Custom Type',
        'parent' => 'Thing',
        'properties' => [
            'customProperty' => [
                'type' => 'Text',
                'label' => 'Custom Property'
            ],
        ],
    ];
    return $types;
} );

Modifying Smart Defaults

Smart defaults are determined in src/utils/smart-defaults.js. You can modify the logic or add support for custom block types.

Output

With Yoast SEO

When Yoast SEO is active, schema data is added to Yoast's schema graph using the wpseo_schema_graph_pieces filter.

Without Yoast SEO

Schema data is output as JSON-LD in the site header:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@type": "Article",
      "headline": "My Article Title",
      "articleBody": "Article content...",
      "image": {
        "@type": "ImageObject",
        "contentUrl": "https://example.com/image.jpg",
        "caption": "Image caption"
      }
    }
  ]
}
</script>

Requirements

  • WordPress 6.0+
  • PHP 8.0+
  • Node.js 18+ (for development)

License

GPL-2.0-or-later

Credits

Built with ❤️ by Human Made

Releases

3 releases. Each count is every asset in that release; expand a row for the breakdown.

Tag
Published
Assets
Downloads
v1.1.0 latest
Oct 6, 2026 19d ago
schema-org-blocks.zip
143
Oct 5, 2026 20d ago
schema-org-blocks.zip
1
Oct 1, 2026 24d ago
pr-6-49b63b85781dd62f8352643263b21359cf150b91-schema-org-blocks.zip +9 assets
0
pr-6-49b63b85781dd62f8352643263b21359cf150b91-schema-org-blocks.zip0
pr-7-659f00b3d018f17c111eb35b7cabad764576953b-schema-org-blocks.zip0
pr-8-8d84eb39f1a0e05188dd27d7acfecfd040efb425-schema-org-blocks.zip0
pr-9-63c5e832a796f9277b1c63961fb56b7fd3e45d99-schema-org-blocks.zip0
pr-10-cf743ca9dc2e56165c93eee9f89c2ca6942bf156-schema-org-blocks.zip0
pr-11-8bd03f79b42bcdaad219ec8c2b0b48aee18f51d5-schema-org-blocks.zip0
pr-10-c393e8dd9199d8ca3aae958cb811d386f5032975-schema-org-blocks.zip0
pr-12-77daf564ffef3428dd2670206ecd051468c803c7-schema-org-blocks.zip0
pr-13-f615f8df8161edd3294248972e5b922812b3ee8d-schema-org-blocks.zip0
pr-14-57475869a38e9f297bc75a052b1b07f9f991633e-schema-org-blocks.zip0
A grade

Security

Schema.org Blocks 1.1.0 · audited by WP Registry

No security issues found.

Audited release
1.1.0
Findings
none
Worst severity
—
Content hash
9408a5a72c1191e1af3b1d52…

WP Registry hashes the installable build and reports on that exact bytes-for-bytes copy. Embargoed findings are withheld until they are disclosed, so a clean verdict means nothing public is outstanding. WP Manifest does not audit code itself.