<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>schema development Archives - Developry Themes</title>
	<atom:link href="https://developrythemes.com/tag/schema-development/feed/" rel="self" type="application/rss+xml" />
	<link>https://developrythemes.com/tag/schema-development/</link>
	<description>Nexus Pro — Engineered for AI Search &#38; SEO Performance</description>
	<lastBuildDate>Mon, 24 Nov 2025 07:58:41 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://developrythemes.com/wp-content/uploads/sites/9/2025/11/cropped-favicon-32x32.png</url>
	<title>schema development Archives - Developry Themes</title>
	<link>https://developrythemes.com/tag/schema-development/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to Create Custom Schema Types in WordPress (Advanced Tutorial)</title>
		<link>https://developrythemes.com/how-to-create-custom-schema-types-in-wordpress-advanced-tutorial/</link>
					<comments>https://developrythemes.com/how-to-create-custom-schema-types-in-wordpress-advanced-tutorial/#respond</comments>
		
		<dc:creator><![CDATA[Krasen Slavov]]></dc:creator>
		<pubDate>Fri, 30 Jan 2026 09:00:00 +0000</pubDate>
				<category><![CDATA[Developer Guides]]></category>
		<category><![CDATA[custom schema]]></category>
		<category><![CDATA[json-ld]]></category>
		<category><![CDATA[schema development]]></category>
		<category><![CDATA[structured data]]></category>
		<category><![CDATA[wordpress development]]></category>
		<guid isPermaLink="false">https://developrythemes.com/?p=517</guid>

					<description><![CDATA[<p>While Nexus Pro provides seven essential schema types out of the box, some projects require custom schema implementations—industry-specific types, additional properties, or nested schema structures.</p>
<p>The post <a href="https://developrythemes.com/how-to-create-custom-schema-types-in-wordpress-advanced-tutorial/">How to Create Custom Schema Types in WordPress (Advanced Tutorial)</a> appeared first on <a href="https://developrythemes.com">Developry Themes</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>While Nexus Pro provides seven essential schema types out of the box, some projects require custom schema implementations—industry-specific types, additional properties, or nested schema structures. Creating custom schema types in WordPress requires understanding Schema.org vocabulary, JSON-LD format, and WordPress hooks for proper implementation.</p>



<p>This advanced guide shows you how to create custom schema types, extend existing schemas, implement complex nested structures, and validate your structured data for Google compatibility.</p>



<h2 class="wp-block-heading" id="understanding-schemaorg-structure">Understanding Schema.org Structure</h2>



<p>Foundation knowledge for custom implementations.</p>



<h3 class="wp-block-heading" id="schemaorg-hierarchy">Schema.org Hierarchy</h3>



<p><strong>Core Concept:</strong>&nbsp;Schema.org uses hierarchical types where specific types inherit properties from parent types.</p>



<p><strong>Example Hierarchy:</strong></p>



<pre class="wp-block-code"><code>Thing
└── CreativeWork
    └── Article
        └── NewsArticle
        └── BlogPosting
        └── TechArticle
</code></pre>



<p><strong>Inheritance:</strong>&nbsp;NewsArticle inherits all properties from Article, CreativeWork, and Thing.</p>



<h3 class="wp-block-heading" id="json-ld-format">JSON-LD Format</h3>



<p><strong>Structure:</strong></p>



<pre class="wp-block-code"><code>{
  "@context": "https://schema.org",
  "@type": "TypeName",
  "property1": "value1",
  "property2": "value2",
  "nestedObject": {
    "@type": "NestedType",
    "nestedProperty": "value"
  }
}
</code></pre>



<p><strong>Key Elements:</strong></p>



<ul class="wp-block-list">
<li><code>@context</code>: Schema.org vocabulary</li>



<li><code>@type</code>: Schema type</li>



<li>Properties: Type-specific attributes</li>



<li>Values: Strings, numbers, objects, arrays</li>
</ul>



<h3 class="wp-block-heading" id="common-schema-types">Common Schema Types</h3>



<p><strong>Available on Schema.org:</strong></p>



<p><strong>Organizations:</strong></p>



<ul class="wp-block-list">
<li>Organization</li>



<li>LocalBusiness</li>



<li>Corporation</li>



<li>EducationalOrganization</li>
</ul>



<p><strong>Creative Works:</strong></p>



<ul class="wp-block-list">
<li>Article</li>



<li>BlogPosting</li>



<li>Book</li>



<li>Movie</li>



<li>MusicAlbum</li>
</ul>



<p><strong>Events:</strong></p>



<ul class="wp-block-list">
<li>Event</li>



<li>BusinessEvent</li>



<li>SocialEvent</li>
</ul>



<p><strong>Products:</strong></p>



<ul class="wp-block-list">
<li>Product</li>



<li>SoftwareApplication</li>



<li>Vehicle</li>
</ul>



<p><strong>People:</strong></p>



<ul class="wp-block-list">
<li>Person</li>
</ul>



<p><strong>200+ types available:</strong>&nbsp;Check Schema.org for complete list.</p>



<h2 class="wp-block-heading" id="creating-basic-custom-schema">Creating Basic Custom Schema</h2>



<p>Implement custom schema from scratch.</p>



<h3 class="wp-block-heading" id="step-1-choose-schema-type">Step 1: Choose Schema Type</h3>



<p><strong>Determine Type:</strong>&nbsp;Browse Schema.org to find appropriate type for your content.</p>



<p><strong>Example:</strong>&nbsp;Creating SoftwareApplication schema for plugin documentation.</p>



<h3 class="wp-block-heading" id="step-2-define-schema-structure">Step 2: Define Schema Structure</h3>



<p><strong>Plan Properties:</strong></p>



<pre class="wp-block-code"><code><em>/**
 * SoftwareApplication schema properties:
 * - name: Application name
 * - applicationCategory: Category (e.g., "DeveloperApplication")
 * - operatingSystem: "WordPress"
 * - offers: Price/availability
 * - aggregateRating: User ratings
 */</em>
</code></pre>



<h3 class="wp-block-heading" id="step-3-create-schema-function">Step 3: Create Schema Function</h3>



<p><strong>Implementation:</strong></p>



<pre class="wp-block-code"><code>function custom_software_schema($post_id) {
    <em>// Get post data</em>
    $post = get_post($post_id);

    <em>// Build schema array</em>
    $schema = &#91;
        '@context' =&gt; 'https://schema.org',
        '@type' =&gt; 'SoftwareApplication',
        'name' =&gt; get_the_title($post_id),
        'description' =&gt; get_the_excerpt($post_id),
        'applicationCategory' =&gt; 'DeveloperApplication',
        'operatingSystem' =&gt; 'WordPress',
        'offers' =&gt; &#91;
            '@type' =&gt; 'Offer',
            'price' =&gt; get_post_meta($post_id, 'price', true),
            'priceCurrency' =&gt; 'USD',
            'availability' =&gt; 'https://schema.org/InStock'
        ],
        'aggregateRating' =&gt; &#91;
            '@type' =&gt; 'AggregateRating',
            'ratingValue' =&gt; get_post_meta($post_id, 'rating', true),
            'reviewCount' =&gt; get_post_meta($post_id, 'review_count', true)
        ]
    ];

    return $schema;
}
</code></pre>



<h3 class="wp-block-heading" id="step-4-output-schema">Step 4: Output Schema</h3>



<p><strong>Add to WordPress:</strong></p>



<pre class="wp-block-code"><code>function output_software_schema() {
    if (is_singular('plugin')) {
        $schema = custom_software_schema(get_the_ID());
        echo '&lt;script type="application/ld+json"&gt;' .
             wp_json_encode($schema, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT) .
             '&lt;/script&gt;';
    }
}
add_action('wp_head', 'output_software_schema');
</code></pre>



<p><strong>Output:</strong></p>



<pre class="wp-block-code"><code>&lt;script type="application/ld+json"&gt;
{
  "@context": "https://schema.org",
  "@type": "SoftwareApplication",
  "name": "Nexus Pro",
  ...
}
&lt;/script&gt;
</code></pre>



<h2 class="wp-block-heading" id="extending-existing-schema">Extending Existing Schema</h2>



<p>Add properties to Nexus Pro schemas.</p>



<h3 class="wp-block-heading" id="filter-nexus-pro-schema">Filter Nexus Pro Schema</h3>



<p><strong>Hook Into Schema Output:</strong></p>



<pre class="wp-block-code"><code><em>// Add custom properties to Article schema</em>
add_filter('nexus_pro_article_schema', 'extend_article_schema', 10, 2);

function extend_article_schema($schema, $post_id) {
    <em>// Add wordCount property</em>
    $content = get_post_field('post_content', $post_id);
    $word_count = str_word_count(strip_tags($content));
    $schema&#91;'wordCount'] = $word_count;

    <em>// Add timeRequired for reading</em>
    $minutes = ceil($word_count / 200); <em>// 200 words per minute</em>
    $schema&#91;'timeRequired'] = 'PT' . $minutes . 'M'; <em>// ISO 8601 duration</em>

    <em>// Add inLanguage</em>
    $schema&#91;'inLanguage'] = get_locale();

    <em>// Add audience</em>
    $difficulty = get_post_meta($post_id, 'difficulty_level', true);
    if ($difficulty) {
        $schema&#91;'audience'] = &#91;
            '@type' =&gt; 'EducationalAudience',
            'educationalRole' =&gt; $difficulty <em>// Beginner, Intermediate, Advanced</em>
        ];
    }

    return $schema;
}
</code></pre>



<h3 class="wp-block-heading" id="add-nested-schemas">Add Nested Schemas</h3>



<p><strong>Complex Structures:</strong></p>



<pre class="wp-block-code"><code>add_filter('nexus_pro_article_schema', 'add_citation_schema', 10, 2);

function add_citation_schema($schema, $post_id) {
    <em>// Get cited sources from custom field</em>
    $citations = get_post_meta($post_id, 'citations', true);

    if (!empty($citations)) {
        $schema&#91;'citation'] = &#91;];

        foreach ($citations as $citation) {
            $schema&#91;'citation']&#91;] = &#91;
                '@type' =&gt; 'CreativeWork',
                'name' =&gt; $citation&#91;'title'],
                'url' =&gt; $citation&#91;'url'],
                'author' =&gt; &#91;
                    '@type' =&gt; 'Person',
                    'name' =&gt; $citation&#91;'author']
                ]
            ];
        }
    }

    return $schema;
}
</code></pre>



<h2 class="wp-block-heading" id="advanced-schema-patterns">Advanced Schema Patterns</h2>



<p>Complex implementations.</p>



<h3 class="wp-block-heading" id="breadcrumb-schema">Breadcrumb Schema</h3>



<p><strong>Navigation Structure:</strong></p>



<pre class="wp-block-code"><code>function generate_breadcrumb_schema() {
    if (!is_singular()) {
        return;
    }

    $breadcrumbs = &#91;];
    $position = 1;

    <em>// Home</em>
    $breadcrumbs&#91;] = &#91;
        '@type' =&gt; 'ListItem',
        'position' =&gt; $position++,
        'name' =&gt; 'Home',
        'item' =&gt; home_url('/')
    ];

    <em>// Categories</em>
    $categories = get_the_category();
    if ($categories) {
        $category = $categories&#91;0];
        $breadcrumbs&#91;] = &#91;
            '@type' =&gt; 'ListItem',
            'position' =&gt; $position++,
            'name' =&gt; $category-&gt;name,
            'item' =&gt; get_category_link($category-&gt;term_id)
        ];
    }

    <em>// Current post</em>
    $breadcrumbs&#91;] = &#91;
        '@type' =&gt; 'ListItem',
        'position' =&gt; $position,
        'name' =&gt; get_the_title(),
        'item' =&gt; get_permalink()
    ];

    $schema = &#91;
        '@context' =&gt; 'https://schema.org',
        '@type' =&gt; 'BreadcrumbList',
        'itemListElement' =&gt; $breadcrumbs
    ];

    return $schema;
}
</code></pre>



<h3 class="wp-block-heading" id="recipe-schema">Recipe Schema</h3>



<p><strong>Detailed Cooking Instructions:</strong></p>



<pre class="wp-block-code"><code>function create_recipe_schema($post_id) {
    $schema = &#91;
        '@context' =&gt; 'https://schema.org',
        '@type' =&gt; 'Recipe',
        'name' =&gt; get_the_title($post_id),
        'image' =&gt; get_the_post_thumbnail_url($post_id, 'large'),
        'author' =&gt; &#91;
            '@type' =&gt; 'Person',
            'name' =&gt; get_the_author_meta('display_name')
        ],
        'datePublished' =&gt; get_the_date('c', $post_id),
        'description' =&gt; get_the_excerpt($post_id),
        'prepTime' =&gt; 'PT' . get_post_meta($post_id, 'prep_time', true) . 'M',
        'cookTime' =&gt; 'PT' . get_post_meta($post_id, 'cook_time', true) . 'M',
        'totalTime' =&gt; 'PT' . get_post_meta($post_id, 'total_time', true) . 'M',
        'recipeYield' =&gt; get_post_meta($post_id, 'servings', true),
        'recipeCategory' =&gt; get_post_meta($post_id, 'category', true),
        'recipeCuisine' =&gt; get_post_meta($post_id, 'cuisine', true),
        'nutrition' =&gt; &#91;
            '@type' =&gt; 'NutritionInformation',
            'calories' =&gt; get_post_meta($post_id, 'calories', true) . ' calories'
        ],
        'recipeIngredient' =&gt; get_post_meta($post_id, 'ingredients', true), <em>// Array</em>
        'recipeInstructions' =&gt; &#91;]
    ];

    <em>// Build instructions</em>
    $steps = get_post_meta($post_id, 'instructions', true);
    foreach ($steps as $index =&gt; $step) {
        $schema&#91;'recipeInstructions']&#91;] = &#91;
            '@type' =&gt; 'HowToStep',
            'name' =&gt; 'Step ' . ($index + 1),
            'text' =&gt; $step,
            'url' =&gt; get_permalink($post_id) . '#step-' . ($index + 1)
        ];
    }

    <em>// Aggregate rating</em>
    $rating = get_post_meta($post_id, 'rating', true);
    if ($rating) {
        $schema&#91;'aggregateRating'] = &#91;
            '@type' =&gt; 'AggregateRating',
            'ratingValue' =&gt; $rating,
            'reviewCount' =&gt; get_post_meta($post_id, 'review_count', true)
        ];
    }

    return $schema;
}
</code></pre>



<h3 class="wp-block-heading" id="video-object-schema">Video Object Schema</h3>



<p><strong>YouTube/Vimeo Integration:</strong></p>



<pre class="wp-block-code"><code>function create_video_schema($post_id) {
    $video_url = get_post_meta($post_id, 'video_url', true);

    if (empty($video_url)) {
        return null;
    }

    $schema = &#91;
        '@context' =&gt; 'https://schema.org',
        '@type' =&gt; 'VideoObject',
        'name' =&gt; get_the_title($post_id),
        'description' =&gt; get_the_excerpt($post_id),
        'thumbnailUrl' =&gt; get_the_post_thumbnail_url($post_id, 'large'),
        'uploadDate' =&gt; get_the_date('c', $post_id),
        'duration' =&gt; 'PT' . get_post_meta($post_id, 'duration', true) . 'S', <em>// seconds</em>
        'contentUrl' =&gt; $video_url,
        'embedUrl' =&gt; $video_url,
        'publisher' =&gt; &#91;
            '@type' =&gt; 'Organization',
            'name' =&gt; get_bloginfo('name'),
            'logo' =&gt; &#91;
                '@type' =&gt; 'ImageObject',
                'url' =&gt; get_site_icon_url()
            ]
        ]
    ];

    return $schema;
}
</code></pre>



<h2 class="wp-block-heading" id="multiple-schemas-per-page">Multiple Schemas Per Page</h2>



<p>Implement graph structure.</p>



<h3 class="wp-block-heading" id="schema-graph">Schema Graph</h3>



<p><strong>Multiple Related Schemas:</strong></p>



<pre class="wp-block-code"><code>function output_schema_graph() {
    $graph = &#91;
        '@context' =&gt; 'https://schema.org',
        '@graph' =&gt; &#91;]
    ];

    <em>// Add Organization schema</em>
    $graph&#91;'@graph']&#91;] = &#91;
        '@type' =&gt; 'Organization',
        '@id' =&gt; home_url('/#organization'),
        'name' =&gt; get_bloginfo('name'),
        'url' =&gt; home_url('/'),
        'logo' =&gt; get_site_icon_url()
    ];

    <em>// Add WebSite schema</em>
    $graph&#91;'@graph']&#91;] = &#91;
        '@type' =&gt; 'WebSite',
        '@id' =&gt; home_url('/#website'),
        'url' =&gt; home_url('/'),
        'name' =&gt; get_bloginfo('name'),
        'publisher' =&gt; &#91;
            '@id' =&gt; home_url('/#organization')
        ],
        'potentialAction' =&gt; &#91;
            '@type' =&gt; 'SearchAction',
            'target' =&gt; home_url('/?s={search_term_string}'),
            'query-input' =&gt; 'required name=search_term_string'
        ]
    ];

    <em>// Add Article schema (if single post)</em>
    if (is_singular('post')) {
        $graph&#91;'@graph']&#91;] = create_article_schema(get_the_ID());
    }

    <em>// Add Breadcrumb schema</em>
    $graph&#91;'@graph']&#91;] = generate_breadcrumb_schema();

    <em>// Output</em>
    echo '&lt;script type="application/ld+json"&gt;' .
         wp_json_encode($graph, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT) .
         '&lt;/script&gt;';
}
add_action('wp_head', 'output_schema_graph');
</code></pre>



<p><strong>Benefits:</strong></p>



<ul class="wp-block-list">
<li>All schemas in one script tag</li>



<li>Clear entity relationships</li>



<li>Efficient for Google parsing</li>
</ul>



<h2 class="wp-block-heading" id="custom-meta-boxes-for-schema">Custom Meta Boxes for Schema</h2>



<p>Admin interface for schema data.</p>



<h3 class="wp-block-heading" id="register-meta-box">Register Meta Box</h3>



<pre class="wp-block-code"><code>function register_schema_meta_box() {
    add_meta_box(
        'custom_schema_meta',
        'Schema Markup Data',
        'render_schema_meta_box',
        'post',
        'side',
        'default'
    );
}
add_action('add_meta_boxes', 'register_schema_meta_box');
</code></pre>



<h3 class="wp-block-heading" id="render-fields">Render Fields</h3>



<pre class="wp-block-code"><code>function render_schema_meta_box($post) {
    wp_nonce_field('save_schema_meta', 'schema_meta_nonce');

    $rating = get_post_meta($post-&gt;ID, 'rating', true);
    $review_count = get_post_meta($post-&gt;ID, 'review_count', true);
    $price = get_post_meta($post-&gt;ID, 'price', true);
    ?&gt;
    &lt;p&gt;
        &lt;label&gt;Rating (1-5):&lt;/label&gt;&lt;br&gt;
        &lt;input type="number" name="rating" value="&lt;?php echo esc_attr($rating); ?&gt;"
               min="1" max="5" step="0.1"&gt;
    &lt;/p&gt;
    &lt;p&gt;
        &lt;label&gt;Review Count:&lt;/label&gt;&lt;br&gt;
        &lt;input type="number" name="review_count" value="&lt;?php echo esc_attr($review_count); ?&gt;"&gt;
    &lt;/p&gt;
    &lt;p&gt;
        &lt;label&gt;Price ($):&lt;/label&gt;&lt;br&gt;
        &lt;input type="number" name="price" value="&lt;?php echo esc_attr($price); ?&gt;"
               min="0" step="0.01"&gt;
    &lt;/p&gt;
    &lt;?php
}
</code></pre>



<h3 class="wp-block-heading" id="save-meta-data">Save Meta Data</h3>



<pre class="wp-block-code"><code>function save_schema_meta($post_id) {
    <em>// Security checks</em>
    if (!isset($_POST&#91;'schema_meta_nonce']) ||
        !wp_verify_nonce($_POST&#91;'schema_meta_nonce'], 'save_schema_meta')) {
        return;
    }

    if (defined('DOING_AUTOSAVE') &amp;&amp; DOING_AUTOSAVE) {
        return;
    }

    if (!current_user_can('edit_post', $post_id)) {
        return;
    }

    <em>// Save fields</em>
    if (isset($_POST&#91;'rating'])) {
        update_post_meta($post_id, 'rating', sanitize_text_field($_POST&#91;'rating']));
    }

    if (isset($_POST&#91;'review_count'])) {
        update_post_meta($post_id, 'review_count', absint($_POST&#91;'review_count']));
    }

    if (isset($_POST&#91;'price'])) {
        update_post_meta($post_id, 'price', sanitize_text_field($_POST&#91;'price']));
    }
}
add_action('save_post', 'save_schema_meta');
</code></pre>



<h2 class="wp-block-heading" id="validation-and-testing">Validation and Testing</h2>



<p>Ensure schema correctness.</p>



<h3 class="wp-block-heading" id="google-rich-results-test">Google Rich Results Test</h3>



<p><strong>Test URL:</strong>&nbsp;<a href="https://search.google.com/test/rich-results">https://search.google.com/test/rich-results</a></p>



<p><strong>Process:</strong></p>



<ol class="wp-block-list">
<li>Enter your URL or paste schema code</li>



<li>Click &#8220;Test URL&#8221; or &#8220;Test Code&#8221;</li>



<li>Review validation results</li>



<li>Fix any errors or warnings</li>
</ol>



<h3 class="wp-block-heading" id="schema-markup-validator">Schema Markup Validator</h3>



<p><strong>Official Tool:</strong>&nbsp;<a href="https://validator.schema.org/">https://validator.schema.org/</a></p>



<p><strong>Features:</strong></p>



<ul class="wp-block-list">
<li>Validates JSON-LD syntax</li>



<li>Checks property compatibility</li>



<li>Identifies schema errors</li>



<li>Suggests improvements</li>
</ul>



<h3 class="wp-block-heading" id="common-validation-errors">Common Validation Errors</h3>



<p><strong>Missing Required Properties:</strong></p>



<pre class="wp-block-code"><code><em>// ERROR - missing required 'name'</em>
$schema = &#91;
    '@type' =&gt; 'Person'
    <em>// Missing 'name' property</em>
];

<em>// CORRECT</em>
$schema = &#91;
    '@type' =&gt; 'Person',
    'name' =&gt; 'John Doe' <em>// Required</em>
];
</code></pre>



<p><strong>Incorrect Data Types:</strong></p>



<pre class="wp-block-code"><code><em>// ERROR - price should be number</em>
'price' =&gt; '$99'

<em>// CORRECT</em>
'price' =&gt; '99.00',
'priceCurrency' =&gt; 'USD'
</code></pre>



<p><strong>Invalid URLs:</strong></p>



<pre class="wp-block-code"><code><em>// ERROR - not a valid URL</em>
'url' =&gt; 'example.com'

<em>// CORRECT</em>
'url' =&gt; 'https://example.com'
</code></pre>



<h2 class="wp-block-heading" id="best-practices">Best Practices</h2>



<p>Professional schema implementation.</p>



<h3 class="wp-block-heading" id="use-constants-for-context">Use Constants for @context</h3>



<pre class="wp-block-code"><code>const SCHEMA_CONTEXT = 'https://schema.org';

$schema = &#91;
    '@context' =&gt; SCHEMA_CONTEXT,
    '@type' =&gt; 'Article'
];
</code></pre>



<h3 class="wp-block-heading" id="sanitize-all-data">Sanitize All Data</h3>



<pre class="wp-block-code"><code>$schema = &#91;
    '@type' =&gt; 'Article',
    'headline' =&gt; esc_html(get_the_title()),
    'description' =&gt; esc_html(get_the_excerpt()),
    'url' =&gt; esc_url(get_permalink())
];
</code></pre>



<h3 class="wp-block-heading" id="check-for-empty-values">Check for Empty Values</h3>



<pre class="wp-block-code"><code>$rating = get_post_meta($post_id, 'rating', true);

if (!empty($rating)) {
    $schema&#91;'aggregateRating'] = &#91;
        '@type' =&gt; 'AggregateRating',
        'ratingValue' =&gt; $rating
    ];
}
</code></pre>



<h3 class="wp-block-heading" id="use-iso-8601-for-dates">Use ISO 8601 for Dates</h3>



<pre class="wp-block-code"><code><em>// Correct format</em>
'datePublished' =&gt; get_the_date('c', $post_id), <em>// 2025-01-15T10:30:00+00:00</em>

<em>// Wrong</em>
'datePublished' =&gt; get_the_date('F j, Y') <em>// January 15, 2025</em>
</code></pre>



<h3 class="wp-block-heading" id="document-custom-schemas">Document Custom Schemas</h3>



<pre class="wp-block-code"><code><em>/**
 * Generate SoftwareApplication schema for plugin posts.
 *
 * @param int $post_id Post ID.
 * @return array Schema markup array.
 */</em>
function custom_software_schema($post_id) {
    <em>// Implementation</em>
}
</code></pre>



<h2 class="wp-block-heading" id="conclusion">Conclusion</h2>



<p>Creating custom schema types in WordPress extends structured data beyond standard implementations. By understanding Schema.org vocabulary, JSON-LD format, and WordPress development practices, you can implement any schema type for your specific needs.</p>



<p><strong>Key Implementation Steps:</strong></p>



<ol class="wp-block-list">
<li>Choose appropriate Schema.org type</li>



<li>Define required and recommended properties</li>



<li>Create PHP function to build schema array</li>



<li>Output JSON-LD in wp_head</li>



<li>Create admin interface for data input</li>



<li>Validate with Google Rich Results Test</li>



<li>Test with Schema.org validator</li>



<li>Monitor Search Console for enhancements</li>
</ol>



<p><strong>Development Checklist:</strong></p>



<ul class="wp-block-list">
<li>✓ Use proper @context and @type</li>



<li>✓ Include all required properties</li>



<li>✓ Sanitize and escape data</li>



<li>✓ Use correct data types</li>



<li>✓ Validate before deployment</li>



<li>✓ Check for empty values</li>



<li>✓ Use ISO 8601 for dates</li>



<li>✓ Test in multiple validators</li>
</ul>



<p>Start by extending Nexus Pro&#8217;s existing schemas with custom properties, then progress to creating completely custom schema types for specialized content. Always validate implementations before deployment to ensure Google compatibility.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p><strong>Related Articles:</strong></p>



<ul class="wp-block-list">
<li><a href="https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/krasenslavov/Desktop/DESKTOP%20-%20EXTENDED/DEVELOPRY%20NEXUS/CONTENT/BLOG/blog-posts/blog-developer-02-custom-schema-types-tutorial.md#">WordPress Hooks and Filters Guide</a></li>



<li><a href="https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/krasenslavov/Desktop/DESKTOP%20-%20EXTENDED/DEVELOPRY%20NEXUS/CONTENT/BLOG/blog-posts/blog-developer-02-custom-schema-types-tutorial.md#">Extending Nexus Pro: Custom Fields</a></li>



<li><a href="https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/krasenslavov/Desktop/DESKTOP%20-%20EXTENDED/DEVELOPRY%20NEXUS/CONTENT/BLOG/blog-posts/blog-developer-02-custom-schema-types-tutorial.md#">Schema Markup: 7 Essential Types</a></li>



<li><a href="https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/krasenslavov/Desktop/DESKTOP%20-%20EXTENDED/DEVELOPRY%20NEXUS/CONTENT/BLOG/blog-posts/blog-developer-02-custom-schema-types-tutorial.md#">FAQ Schema Guide for Rich Results</a></li>
</ul>
<p>The post <a href="https://developrythemes.com/how-to-create-custom-schema-types-in-wordpress-advanced-tutorial/">How to Create Custom Schema Types in WordPress (Advanced Tutorial)</a> appeared first on <a href="https://developrythemes.com">Developry Themes</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://developrythemes.com/how-to-create-custom-schema-types-in-wordpress-advanced-tutorial/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
