WordPress
Add JsonLD.io to your WordPress site using one of these methods.
Method 1: Theme Header (Recommended)
Add the script to your theme's header:
- Go to Appearance → Theme File Editor
- Select
header.phpfrom the right sidebar - Find the
</head>tag - Add the script just before it:
<!-- JsonLD.io Script -->
<script async src="https://jsonld.io/api/jsonld/YOUR_TOKEN?format=js"></script>
</head>
- Click Update File
Method 2: Using functions.php
Add this code to your theme's functions.php:
function add_jsonld_script() {
echo '<script async src="https://jsonld.io/api/jsonld/YOUR_TOKEN?format=js"></script>';
}
add_action('wp_head', 'add_jsonld_script');
Method 3: Plugin (Insert Headers and Footers)
- Install the Insert Headers and Footers plugin
- Go to Settings → Insert Headers and Footers
- In the Scripts in Header box, add:
<script async src="https://jsonld.io/api/jsonld/YOUR_TOKEN?format=js"></script>
- Click Save
Child Theme Recommended
If using Method 1 or 2, consider creating a child theme first. This prevents your changes from being overwritten during theme updates.
Disable Other Schema Plugins
If you have other SEO plugins generating structured data (Yoast, Rank Math, etc.), consider disabling their schema features to avoid duplicate markup:
- Yoast SEO: Settings → Features → Schema → Off
- Rank Math: General Settings → Schema Markup → Disable
Verification
- Visit any page on your WordPress site
- View the page source
- Search for
application/ld+json - Confirm your JsonLD.io schema appears
