I want to add Google structure data in WordPress Blog posts, pages. Where i need to place Structure data (in body or head section)? What is the correct schema structure for Posts or pages?


2 Answers 2


From the Google Codelabs:

Structured data provides a way to standardize information about a page and classify the page content. JSON-LD is used for data in a simple JavaScript-oriented object notation and is Google's preferred format for structured data. JSON-LD should be inside a element in either the or of the page.

There are some examples of how to implement it as part of the Codelab guide Add structured data to your web pages.

As to what data you use, it depends what your website posts and pages are about. There are many different schemas depending on the content, you can browse them on the https://schema.org website, along with JSON-LD example code. For example, if your posts are reviews for a book:

<script type="application/ld+json">
  "@context": "http://schema.org",
  "@type": "WebPage",
  "breadcrumb": "Books > Literature & Fiction > Classics",
          "@type": "Book",
          "author": "/author/jd_salinger.html",
          "bookFormat": "http://schema.org/Paperback",
          "datePublished": "1991-05-01",
          "image": "catcher-in-the-rye-book-cover.jpg",
          "inLanguage": "English",
          "isbn": "0316769487",
          "name": "The Catcher in the Rye",
          "numberOfPages": "224",
          "offers": {
            "@type": "Offer",
            "availability": "http://schema.org/InStock",
            "price": "6.99",
            "priceCurrency": "USD"
          "publisher": "Little, Brown, and Company",
          "aggregateRating": {
            "@type": "AggregateRating",
            "ratingValue": "4",
            "reviewCount": "3077"
          "review": [
              "@type": "Review",
              "author": "John Doe",
              "datePublished": "2006-05-04",
              "name": "A masterpiece of literature",
              "reviewBody": "I really enjoyed this book. It captures the essential challenge people face as they try make sense of their lives and grow to adulthood.",
              "reviewRating": {
            "@type": "Rating",
            "ratingValue": "5"
              "@type": "Review",
              "author": "Bob Smith",
              "datePublished": "2006-06-15",
              "name": "A good read.",
              "reviewBody": "Catcher in the Rye is a fun book. It's a good book to read.",
              "reviewRating": "4"

You would probably want to use a hook to insert the script into the head of your site, pulling in data from your page/post.


All In One Schema Rich Snippets

This plugin will help you link

  • I don't want to use any plugin.
    – Shoaib Saleem
    Jan 30, 2019 at 12:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.