コーポレート(事業者)情報などのJson-LDサンプル(Json-LD Sample for Corporate Information):以下のような記述をfunctions.phpに記載する必用があります。(The following code needs to be added to functions.php.)


<?php
function add_jsonld_to_specific_page()
{  
    if (is_page((ページID))) {
        echo '
        <script type="application/ld+json">{
            "@context": "https://schema.org",
            "@type": "(企業タイプ)",
            "name": "(事業・企業名)",
            "url": "(事業・企業ドメイン)",
            "logo": "(ロゴURL)",
            "contactPoint": {
                "@type": "ContactPoint",
                "telephone": "(電話)",
                "contactType": "Customer Service",
                "areaServed": "(国)",
                "availableLanguage": ["(言語)"]
            },
            "openingHours": "(営業時間)",
            "department": [
                {
                    "@type": "LocalBusiness",
                    "name": "本社",
                    "address": {
                        "@type": "PostalAddress",
                        "streetAddress": "(本社住所)",
                        "addressLocality": "(市)",
                        "addressRegion": "(県)",
                        "postalCode": "(郵便番号)",
                        "addressCountry": "(国)"
                    },
                    "telephone": "(電話)",
                    "openingHoursSpecification": [
                        {
                            "@type": "OpeningHoursSpecification",
                            "dayOfWeek": ["(営業曜日)"],
                            "opens": "(始業)",
                            "closes": "(終業)"
                        },
                        {
                            "@type": "OpeningHoursSpecification",
                            "dayOfWeek": ["(お休み曜日)"],
                            "opens": "00:00",
                            "closes": "00:00"
                        }
                    ]
                },
                {
                    "@type": "LocalBusiness",
                    "name": "支店",
                    "address": {
                        "@type": "PostalAddress",
                        "streetAddress": "(支店住所)",
                        "addressLocality": "(市)",
                        "addressRegion": "(県)",
                        "postalCode": "(郵便番号)",
                        "addressCountry": "(国)"
                    },
                    "telephone": "(電話)",
                    "hasMap": "(マップURL)",
                    "openingHoursSpecification": [
                        {
                            "@type": "OpeningHoursSpecification",
                            "dayOfWeek": ["(営業曜日)"],
                            "opens": "(始業)",
                            "closes": "(終業)"
                        },
                        {
                            "@type": "OpeningHoursSpecification",
                            "dayOfWeek": ["(休業曜日)"],
                            "opens": "00:00",
                            "closes": "00:00"
                        }
                    ]
                }
            ],
            "serviceArea": [
                {"@type": "AdministrativeArea", "name": "(商圏A)"},
                {"@type": "AdministrativeArea", "name": "(商圏B)"},
                {"@type": "AdministrativeArea", "name": "(商圏C)"}
            ],
            "description": "(事業内容)",
            "identifier": "(許認可免許関係)",
            "itemListElement": [
                {
                    "@type": "Offer",
                    "itemOffered": "(サービス内容A)",
                    "description": "(サービス内容A説明)",
                    "price": "¥(料金帯A)"
                },
                {
                    "@type": "Offer",
                    "itemOffered": "(サービス内容B)",
                    "description": "(サービス内容B説明)",
                    "price": "¥(料金帯B)"
                },
                {
                    "@type": "Offer",
                    "itemOffered": "(サービス内容C)",
                    "description": "(サービス内容C説明)",
                    "price": "¥(料金帯C)"
                }
            ],
            "additionalProperty": [
                {
                    "@type": "PropertyValue",
                    "name": "(提供できる価値A)",
                    "value": "(提供できる価値A説明)"
                },
                {
                    "@type": "PropertyValue",
                    "name": "(提供できる価値B)",
                    "value": "(提供できる価値B説明)"
                },
                {
                    "@type": "PropertyValue",
                    "name": "(提供できる価値C)",
                    "value": "(提供できる価値C説明)"
                }
            ]
        }</script>';
    }
}
add_action('wp_head', 'add_jsonld_to_specific_page');
?>