Step-by-step instructions for implementing schema markup on WordPress, Shopify, Wix, and other platforms. Learn how to add structured data to boost your SEO and earn rich results.
Schema markup (also called structured data) is a standardized format for providing information about a page and classifying the page content. It helps search engines understand your content better, which can lead to rich results and improved visibility.
Schema markup has become essential for modern SEO. Websites with proper schema implementation see 30-40% higher click-through rates, appear in rich results, and are better positioned for voice search and AI-powered search experiences.
Before implementing schema, you need to generate the proper JSON-LD code. Here's how to use FixMyKB to create perfect schema markup:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Organization",
"name": "Your Company Name",
"url": "https://yourwebsite.com",
"logo": "https://yourwebsite.com/logo.png",
"description": "Brief description of your organization",
"address": {
"@type": "PostalAddress",
"streetAddress": "123 Main St",
"addressLocality": "City",
"addressRegion": "State",
"postalCode": "12345",
"addressCountry": "US"
},
"contactPoint": {
"@type": "ContactPoint",
"telephone": "+1-555-123-4567",
"contactType": "customer service"
}
}
</script>
WordPress offers several methods for adding schema markup. Choose the approach that best fits your technical comfort level and website setup.
For more control, add schema directly to your theme:
function add_schema_markup() {
if (is_front_page()) {
$schema = '{
"@context": "https://schema.org",
"@type": "Organization",
"name": "Your Company",
"url": "' . home_url() . '",
"logo": "' . get_template_directory_uri() . '/logo.png"
}';
echo '<script type="application/ld+json">' . $schema . '</script>';
}
}
add_action('wp_head', 'add_schema_markup');
Always use a child theme when modifying theme files. Test schema implementation after theme updates, and consider using schema plugins for complex implementations.
Shopify has built-in schema for products, but you can enhance it with custom markup.
{% if template.name == 'product' %}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Product",
"name": "{{ product.title | escape }}",
"image": "{{ product.featured_image | img_url: 'master' }}",
"description": "{{ product.description | strip_html | escape }}",
"sku": "{{ product.selected_or_first_available_variant.sku }}",
"brand": {
"@type": "Brand",
"name": "{{ product.vendor | escape }}"
},
"offers": {
"@type": "Offer",
"url": "{{ shop.url }}{{ product.url }}",
"priceCurrency": "{{ shop.currency }}",
"price": "{{ product.price | money_without_currency | remove: ',' }}",
"availability": "https://schema.org/{% if product.available %}InStock{% else %}OutOfStock{% endif %}"
}
}
</script>
{% endif %}
Wix automatically generates basic schema, but you can add custom markup for better results.
// Add to page code
import wixWindow from 'wix-window';
$w.onReady(function () {
const schema = {
"@context": "https://schema.org",
"@type": "LocalBusiness",
"name": "Your Business Name",
"description": "Business description",
"url": wixWindow.location.url,
"telephone": "+1234567890",
"address": {
"@type": "PostalAddress",
"streetAddress": "123 Main St",
"addressLocality": "Your City",
"addressRegion": "State",
"postalCode": "12345"
}
};
// Add schema to page head
$w('#html1').html = `<script type="application/ld+json">${JSON.stringify(schema)}</script>`;
});
For custom websites or platforms without built-in schema support, add markup directly to HTML.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Your Page Title</title>
<!-- Schema Markup -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebPage",
"name": "Page Title",
"description": "Page description",
"url": "https://yourwebsite.com/page",
"mainEntity": {
"@type": "Article",
"headline": "Article Headline",
"author": {
"@type": "Person",
"name": "Author Name"
},
"datePublished": "2025-01-01",
"dateModified": "2025-01-01"
}
}
</script>
</head>
<body>
<!-- Your page content -->
</body>
</html>
Add schema directly to each HTML file in the <head> section
Add schema to layout components or use plugins for frameworks like Next.js, Gatsby
Modify template files or add schema fields to your content types
Always test your schema implementation to ensure it's working correctly.
Test both by URL and code snippet. Check multiple page types on your site. Monitor Search Console regularly for new errors. Test after major website updates.
Violating Google's structured data guidelines can result in manual actions. Never use schema markup for deceptive purposes or to mislead users.
Generate perfect schema markup for your website with our free tools
Generate Schema Now ⚡