</> ConvertAtlas Developer Tools
Schema & Structured Data

Schema Article JSON-LD

Add Article, BreadcrumbList, WebSite and Organization structured data automatically.

Download plugin v1.0.0 Requires 5.5+ Tested 6.5 GPL-2.0

Schema Article JSON-LD adds the structured data that helps search engines understand your content and can unlock rich results. On every page it outputs WebSite and Organization schema, and on single posts it adds an Article entity with headline, author, dates and featured image, plus a BreadcrumbList. Everything is emitted as a single valid JSON-LD graph in the head — no settings to wrestle with, no external calls.

Features

Article JSON-LD on posts (headline, author, published/modified dates, image)
BreadcrumbList structured data on posts
WebSite and Organization schema on every page
Single combined @graph for clean, valid output
Uses the featured image automatically
No settings page, no database tables, no external requests

Installation

  1. Download schema-article-jsonld.php below.
  2. Upload it to wp-content/plugins/, or zip and upload via Plugins → Add New → Upload Plugin.
  3. Activate the plugin.
  4. Validate any post with Google's Rich Results Test to confirm the structured data is detected.

What’s inside

This plugin is open source under the GPL. Here is the start of the file — download it for the complete, ready-to-use plugin.

php
<?php
/**
 * Plugin Name:       Schema Article JSON-LD by ConvertAtlas
 * Plugin URI:        https://convertatlas.org/en/wordpress/schema-article-jsonld
 * Description:       Outputs Article and BreadcrumbList JSON-LD structured data on posts, plus WebSite + Organization on the home page. Helps search engines understand your content.
 * Version:           1.0.0
 * Requires at least: 5.5
 * Requires PHP:      7.4
 * Author:            ConvertAtlas
 * Author URI:        https://convertatlas.org
 * License:           GPL-2.0-or-later
 * Text Domain:       ca-schema-article
 *
 * Built with convertatlas.org — free developer tools & templates.
 */

if (!defined('ABSPATH')) { exit; }

final class CA_Schema_Article {

    public static function init() {
        $self = new self();
        add_action('wp_head', array($self, 'output'), 5);
    }

    private function clean($text, $words = 40) {
        return wp_trim_words(wp_strip_all_tags($text), $words, '');
    }

    public function output() {
        $graph = array();
        $site_name = get_bloginfo('name');
        $site_url  = home_url('/');

        // WebSite + Organization (everywhere)
        $graph[] = array(
            '@type' => 'WebSite',
            '@id'   => $site_url . '#website',
            'url'   => $site_url,
            'name'  => $site_name,
            'description' => get_bloginfo('description'),
        );
/* … download the file for the full source … */

Frequently asked questions

Will this give me rich results in Google?

It outputs valid, eligible structured data, which is a prerequisite for rich results. Google decides whether to show them based on many factors, but correct schema gives you the best chance.

Does it duplicate schema if I use another SEO plugin?

Possibly. If your SEO plugin already outputs Article or WebSite schema, run only one to avoid duplicate entities. Disable the other plugin's schema or use this on sites without one.

Can I add my logo to the Organization schema?

Yes — edit the Organization array in the code and add a logo property pointing to your image URL. The code is plain, commented PHP.

Does it support pages and custom post types?

It targets posts for the Article entity by default. You can extend the is_singular() check to include pages or custom post types.

Open source & self-containedBuilt with convertatlas.org. No external requests, no tracking, GPL-licensed — audit and modify it freely.