@charset "UTF-8";

/*!
Theme Name: Cocoon Child
Description: Cocoon専用の子テーマ
Theme URI: https://wp-cocoon.com/
Author: わいひら
Author URI: https://nelog.jp/
Template:   cocoon-master
Version:    1.1.3
*/

/************************************
** 子テーマ用のスタイルを書く
************************************/
/*必要ならばここにコードを書く*/

/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
/*1023px以下*/
@media screen and (max-width: 1023px){
  /*必要ならばここにコードを書く*/
}

/*834px以下*/
@media screen and (max-width: 834px){
  /*必要ならばここにコードを書く*/
}

/*480px以下*/
@media screen and (max-width: 480px){
  /*必要ならばここにコードを書く*/
}
// ============================================
// 蒼井 悠真｜Cocoon構造化データ 自動出力コード
// Article＋Product（3商品例）
// ============================================

function yuuma_add_jsonld_schema() {
  if (is_single()) : ?>

  <script type="application/ld+json">
  {
    "@context": "https://schema.org",
    "@type": "Article",
    "headline": "<?php echo esc_html(get_the_title()); ?>",
    "description": "<?php echo esc_html(wp_strip_all_tags(get_the_excerpt())); ?>",
    "author": {
      "@type": "Person",
      "name": "蒼井 悠真",
      "url": "https://example.com/about"
    },
    "publisher": {
      "@type": "Organization",
      "name": "悠真トラベルジャーナル",
      "url": "https://example.com",
      "logo": {
        "@type": "ImageObject",
        "url": "https://example.com/logo.png"
      }
    },
    "image": "<?php echo esc_url(get_the_post_thumbnail_url(get_the_ID(), 'full')); ?>",
    "datePublished": "<?php echo get_the_date('c'); ?>",
    "dateModified": "<?php echo get_the_modified_date('c'); ?>",
    "mainEntityOfPage": {
      "@type": "WebPage",
      "@id": "<?php echo esc_url(get_permalink()); ?>"
    },
    "keywords": "旅行バッグ, CA, おすすめ, 機内持ち込み, 軽量, レディース, メンズ",
    "citation": [
      "https://camam-azu.com/flightattendant_bag/",
      "https://nlab.itmedia.co.jp/research/articles/3583702/",
      "https://lifehacker.jp/article/machi-ya-bluetripbag-additional-853445/"
    ],
    "hasPart": [
      {
        "@type": "Product",
        "name": "PORTER TANKER ミニボストン",
        "brand": {
          "@type": "Brand",
          "name": "PORTER"
        },
        "description": "CA御用達の軽量ナイロンボストン。キャリーオン対応・撥水仕様。",
        "image": "https://www.yoshidakaban.com/product/image.jpg",
        "url": "https://www.yoshidakaban.com/product/",
        "offers": {
          "@type": "Offer",
          "priceCurrency": "JPY",
          "price": "38500",
          "availability": "https://schema.org/InStock"
        }
      },
      {
        "@type": "Product",
        "name": "THE NORTH FACE シャトルデイパック",
        "brand": {
          "@type": "Brand",
          "name": "THE NORTH FACE"
        },
        "description": "CAにも人気のバックパック。撥水・PC収納・軽量・スマートデザイン。",
        "image": "https://www.goldwin.co.jp/tnf/product/image.jpg",
        "url": "https://www.goldwin.co.jp/tnf/",
        "offers": {
          "@type": "Offer",
          "priceCurrency": "JPY",
          "price": "19800",
          "availability": "https://schema.org/InStock"
        }
      },
      {
        "@type": "Product",
        "name": "Samsonite × ANA コラボ 3WAYボストン",
        "brand": {
          "@type": "Brand",
          "name": "Samsonite"
        },
        "description": "ANA CA監修の限定モデル。収納力と美しさを両立。",
        "image": "https://nlab.itmedia.co.jp/images/ana_samsonite.jpg",
        "url": "https://nlab.itmedia.co.jp/research/articles/3583702/",
        "offers": {
          "@type": "Offer",
          "priceCurrency": "JPY",
          "price": "42000",
          "availability": "https://schema.org/InStock"
        }
      }
    ]
  }
  </script>

  <?php endif;
}
add_action('wp_head', 'yuuma_add_jsonld_schema');
