ワードプレス
JSON-LD
JSON-LD
◆プロパティ一覧:http://schema-ja.appspot.com/docs/full.html
Step1:まず宣言
<script type="application/ld+json">
{
"@context": "http://schema.org",
// ここにこれから記述
}
</script>
Step2:タイプ選択(何のページなのか?)
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebSite", // コーポレートサイトのトップなど
"@type": "Product", // 製品や商品紹介など
"@type": "Event", // 行事や予定など
// ↑ 細かくは、BusinessEvent,SaleEvent,SportsEventなど有り
"@type": "NewsArticle", // お知らせなど
"@type": "blogPosts", // ブログ投稿
}
</script>
Step3:名前、URL、ディスクリプション、日付、画像URLなど必要に応じてプロパティを記述
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "タイプ",
"url": "対象ページのURL",
"name": "企業名・商品名・イベント名など",
"description": "対象の概要",
"image": "商品など画像のURL",
}
}
</script>
◆記述例:コーポレートサイト
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebSite",
"url": "対象ページのURL",
"name": "企業名",
"alternateName": "企業名(英数) Inc.",
"publisher":{
"@context": "http://schema.org",
"@type": "Corporation",
"name": "企業名(日本語)",
"address": {
"@type": "PostalAddress",
"addressLocality": "都道府県",
"addressRegion": "JP",
"postalCode": "郵便番号",
"streetAddress": "住所"
}
}
}
</script>
◆記述例:製品・商品
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Product",
"url": "対象ページのURL",
"name": "商品の名称",
"description": "商品の概要"
"releaseDate": "発売日"
"image": "商品画像のURL"
"url": "商品ページのURL"
"offers": {
"@context": "http://schema.org",
"@type": "Offer",
"price": "2980(値段:数字のみ)",
"priceCurrency": "JPY"
},
"brand":{
"@context": "http://schema.org",
"@type": "Corporation",
"name": "製造企業名・ブランド名",
"address": {
"@type": "PostalAddress",
"addressLocality": "製造企業:都道府県",
"addressRegion": "JP",
"postalCode": "製造企業:郵便番号",
"streetAddress": "製造企業:住所"
}
}
}
</script>
