@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
*/

/************************************
** 子テーマ用のスタイルを書く
************************************/
// サムネ左上のカテゴリラベルを「施設ジャンル」だけに限定（Cocoon用）
add_filter('cocoon_entry_card_category', function($cat){
    // 施設ジャンルの親カテゴリのスラッグを指定
    $parent_slug = 'facility'; // ←ここをあなたの親カテゴリのスラッグに変更

    if(!$cat) return $cat;

    // 親が facility のものだけ表示
    if ($cat->parent) {
        $parent = get_category($cat->parent);
        if ($parent && $parent->slug === $parent_slug) {
            return $cat;
        }
    }

    // それ以外は表示しない
    return null;
});


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

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

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