Last active
September 23, 2016 09:04
-
-
Save daviddarke/14b4fc2732e615630cabc2326613b392 to your computer and use it in GitHub Desktop.
Used for adding structured data to blog post in wordpress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="application/ld+json"> | |
{ | |
"@context": "http://schema.org", | |
"@type": "Article", | |
"mainEntityOfPage": { | |
"@type": "WebPage", | |
"@id": "{{post.link}}" | |
}, | |
"headline": "{{ post.title }}", | |
"image": { | |
"@type": "ImageObject", | |
"url": "{{post.thumbnail.src}}", | |
"height": {{ post.thumbnail.height }}, | |
"width": {{ post.thumbnail.width}} | |
}, | |
"datePublished": "{{ post.post_date | date("c") }}", | |
"dateModified": "{{ post.post_modified | date("c") }}", | |
"author": { | |
"@type": "Person", | |
"name": "{{ post.author }}" | |
}, | |
"publisher": { | |
"@type": "Organization", | |
"name": "Atomic Smash", | |
"logo": { | |
"@type": "ImageObject", | |
"url": "LINK_TO_YOUR_LOGO", | |
"width": 300, | |
"height": 60 | |
} | |
}, | |
"description": "{{post.post_excerpt}}" | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment