Adding schema with nested properties
-
I think this is a fantastic plugin, yesterday I left a five star review :
One of the reasons I think this is a fantastic plugin is that it allows programmatic adding of schema as described at:
https://docs.wpslimseo.com/slim-seo/schema/
This gives the example code:add_filter( 'slim_seo_schema_graph', function ( $graph ) {
if ( is_singular( 'movie' ) ) {
$graph[] = [
'@type' => 'Movie',
'name' => get_the_title(),
'director' => get_post_meta( get_the_ID(), 'director', true ),
];
}
return $graph;
} );And this works really well.
But I would like to add eg:
{
"@context": "https://schema.org",
"@type": "WebPage",
"name": "Mortgage Calculator",
"mainEntity": {
"@type": "SoftwareApplication",
"name": "Mortgage Calculator",
"operatingSystem": "Web",
"applicationCategory": "Calculator",
"isAccessibleForFree": true
}
}Where “”@type”: “SoftwareApplication”, is a sub or nested property of “mainEntity”.
Is is possible to add this type of schema structure in the free version?
Thanks ahead of time and thanks for such a great plugin.
You must be logged in to reply to this topic.