schema.org development
-
Hello everyone,
i stared to update my complete homepage with schema.org schemata. I was able to update all pages. Now i want to update all posts too. Meanwhile i have a number of about 150 post. I will take day of work to update them all manually.
Thatswhy i created custom templates for each post category and created a standard schema based on schema.org.
My problem: “BlogPostins” schemata needing variables: “headline”, “datePubished”, “dateModified” “author -> name”, which i can’t set up with a standard value. They have to be dynamically directly from the post. I want to insert the complete schema into my single.php below line 22.
Now my question: How can i get the values”headline”, “datePubished”, “dateModified” “author -> name” dynamically into my schema? Please remember, i want to insert this script into my single.php.
This is one of my standard schema i am using:
<script type=”application/ld+json”>
{
“@context”:”http://schema.org”,
“@type”:”BlogPosting”,
“headline”:”has to bee dynamically”,
“datePublished”:”has to bee dynamically”,
“dateModified”:”has to bee dynamically”,
“author”:
{
“@type”:”Person”,
“name”:”has to bee dynamically”
},
“mainEntityOfPage”:
{
“@type”:”WebPage”,
“@id”:”https://rostocker.taxi/”
},
“publisher”:
{
“@type”:”Organization”,
“name”:”Taxi Rostock”,
“logo”:
{
“@type”:”ImageObject”,
“url”:”https://rostocker.taxi/wp-content/uploads/2015/10/logo-compressed.png”
}
},
“image”:
{
“@type”:”ImageObject”,
“url”:”https://rostocker.taxi/wp-content/uploads/2015/10/taxi.png”,
“width”:”300″,
“height”:”60″
},
“about”:
{
“@type”: “TaxiService”,
“name”: “Taxi Rostock”,
“url”: “https://rostocker.taxi/taxi-rostock-bestellen”,
“serviceType”: “Transfer mit Taxi”,
“logo”: “https://rostocker.taxi/wp-content/uploads/2016/08/taxi-rostock-gray.jpg”,
“description”: “Bestellen Sie sich schnell und bequem ein Taxi Rostock zum Wunschort und zur Wunschzeit. Rufen Sie an, schreiben Sie eine E-Mail oder nutzen Sie das Kontaktformular.”,
“potentialAction”:
{
“@type”: “TransferAction”,
“instrument”: [“Volkswagen Caravelle”,”Mercedes Vito”]
},
“providerMobility”: “dynamic”
}
}
},
}
</script>
The topic ‘schema.org development’ is closed to new replies.