admin管理员组文章数量:1130349
what is a simple and reliable way to insert schema markup (JSON-LD) in my static WP pages manually? My question is not about creating the JSON-LD code, but how to implement it in the WP source code. I don't want to use a plugin or the Google Tag Manager.
JSON-LD markup is a script tag, which actually does not contain executable JavaScript as far as I know. It's meta data which should not show up on front page, it's information for search engines and looks like this:
<script type="application/ld+json">
{
"@context": "",
"@type": "LocalBusiness",
"address": {
"@type": "PostalAddress",
"addressLocality": "Mexico Beach",
"addressRegion": "FL",
"streetAddress": "3102 Highway 98"
},
"description": "A superb collection of fine gifts and clothing to accent your stay in Mexico Beach.",
"name": "Beachwalk Beachwear & Giftware",
"telephone": "850-648-4200"
}
</script>
Some blogs in the web suggest to create a WP custom field.
Is this really the best way to do it manually and why?
At the moment I'm not sure where to place the code. In the head it may slow user visible loading time, but gives the JSON-code a clearly separated place from the important body source code. May be just before closing body-tag would be a nice place too. Can I decide where to place it by using custom fields and how?
Thanks,
Martin
what is a simple and reliable way to insert schema markup (JSON-LD) in my static WP pages manually? My question is not about creating the JSON-LD code, but how to implement it in the WP source code. I don't want to use a plugin or the Google Tag Manager.
JSON-LD markup is a script tag, which actually does not contain executable JavaScript as far as I know. It's meta data which should not show up on front page, it's information for search engines and looks like this:
<script type="application/ld+json">
{
"@context": "",
"@type": "LocalBusiness",
"address": {
"@type": "PostalAddress",
"addressLocality": "Mexico Beach",
"addressRegion": "FL",
"streetAddress": "3102 Highway 98"
},
"description": "A superb collection of fine gifts and clothing to accent your stay in Mexico Beach.",
"name": "Beachwalk Beachwear & Giftware",
"telephone": "850-648-4200"
}
</script>
Some blogs in the web suggest to create a WP custom field.
Is this really the best way to do it manually and why?
At the moment I'm not sure where to place the code. In the head it may slow user visible loading time, but gives the JSON-code a clearly separated place from the important body source code. May be just before closing body-tag would be a nice place too. Can I decide where to place it by using custom fields and how?
Thanks,
Martin
本文标签: Inserting Schema Markup (JSONLD) Manually with Custom Fields or any Better Ways
版权声明:本文标题:Inserting Schema Markup (JSON-LD) Manually with Custom Fields or any Better Ways? 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749182894a2328906.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论