Home › Forums › Gillion Theme › implementing (structured data)
Home › Forums › Gillion Theme › implementing (structured data)
I am implementing (structured data) in the theme. I would like to know which page (php) of the theme I have to put?
<script type=”application/ld+json”>
{
“@context”: “http://schema.org”,
“@type”: “NewsArticle”,
“mainEntityOfPage”: {
“@type”: “WebPage”,
“@id”: “https://google.com/article”
},
“headline”: “Article headline”,
“image”: [
“https://example.com/photos/1×1/photo.jpg”,
“https://example.com/photos/4×3/photo.jpg”,
“https://example.com/photos/16×9/photo.jpg”
],
“datePublished”: “2015-02-05T08:00:00+08:00”,
“dateModified”: “2015-02-05T09:20:00+08:00”,
“author”: {
“@type”: “Person”,
“name”: “John Doe”
},
“publisher”: {
“@type”: “Organization”,
“name”: “Google”,
“logo”: {
“@type”: “ImageObject”,
“url”: “https://google.com/logo.jpg”
}
},
“description”: “A most wonderful article”
}
</script>
Hi @juniormartian,
I hope you are well today and thank you for your question.
Instead of making changes in the theme files, you can try using following plugins to achieve it.
https://wordpress.org/plugins/wp-seo-structured-data-schema/
https://wordpress.org/plugins/tags/structured-data/
https://wordpress.org/plugins/all-in-one-schemaorg-rich-snippets/
Best regards,
Shufflehound team
I would like to put it manually. The theme already has a lot of plugin installed. What php file should I put?
You can develop code using below wp_head action and add that code in the functions.php file of your theme that will add that structured data in your site header.
https://codex.wordpress.org/Plugin_API/Action_Reference/wp_head