schema.org

open (2 posts) (2 voices)

  1. 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>

    Posted 4 months ago #
  2. OnePressTech
    Member

    Since you are a non-coder Colin is there any reason you don't just use a plugin like https://en-au.wordpress.org/plugins/schema/ ?

    Posted 4 months ago #

Reply

You must log in to post.

Construct WordPress Theme
Construct wordpress theme
Myriad WordPress Theme
Myriad wordpress theme
Method WordPress Theme
Method wordpress theme
Fusion WordPress Theme
Fusion wordpress theme
Elegance WordPress Theme
Elegance wordpress theme
Echelon WordPress Theme
Echelon wordpress theme
Dejavu WordPress Theme
Dejavu wordpress theme
Modular WordPress Theme
Modular wordpress theme