This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function custom_date(){ | |
$date = get_the_time('Ymd'); | |
$y = get_the_time('Y'); | |
$m = get_the_time('n'); | |
$d = get_the_time('j'); | |
//昭和 | |
if($date < 19890108){ | |
if($y == 1926){ | |
echo "昭和元年"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//タクソノミーによって条件分岐させる場合 | |
<?php if(is_tax("タクソノミー名")): ?> | |
//処理を記載 | |
<?php endif; ?> | |
//タームによって条件分岐させる場合 | |
<?php if(is_tax("タクソノミー名", "ターム名")): ?> | |
//処理を記載 | |
<?php endif; ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$custom_posts = get_posts(array( | |
'post_type' => 'カスタム投稿タイプスラッグ', // 投稿タイプ | |
'posts_per_page' => 6, // 表示件数 | |
'orderby' => 'date', // 表示順の基準 | |
'order' => 'DESC', // 昇順・降順 | |
'tax_query' => array( | |
array( | |
'taxonomy' => 'タクソノミースラッグ', //タクソノミーを指定 | |
'field' => 'slug', //ターム名をスラッグで指定する |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function () { | |
var swiperSlide = $(this).find('.top_pickup_list_item'); | |
var loopflag = false; | |
if (swiperSlide.length >= 4) { | |
loopflag = true; | |
} | |
var swiper = new Swiper('.swiper-container', { | |
spaceBetween: 30, | |
breakpoints: { | |
768: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ul class="g_nav"> | |
<li class="g_nav_item menu_single"><a href="#" class="init-bottom">BRANDS</a> | |
<ul class="menu_second_level"> | |
<li class="menu_second_level_item"><a href="#">KOBEDO</a></li> | |
<li class="menu_second_level_item"><a href="#">COUNTRY</a></li> | |
<li class="menu_second_level_item"><a href="#">KOBEDOG</a></li> | |
</ul> | |
</li> | |
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(function($) { | |
//data-hrefの属性を持つtrを選択しclassにclickableを付加 | |
$('tr[data-href]').addClass('clickable') | |
//クリックイベント | |
.click(function(e) { | |
//e.targetはクリックした要素自体、それがa要素以外であれば | |
if(!$(e.target).is('a')){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// アニメーション対象 | |
const targetElements = document.querySelectorAll(".js-ObserveAnimationTarget"); | |
const observeAnimation = () => { | |
if (!targetElements.length) return; | |
const handleObserve = entries => { | |
entries.forEach(entry => { | |
if (entry.isIntersecting) { | |
entry.target.setAttribute("data-animated", "true"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.hoge { | |
text-shadow: 0 0 25px #edf8ff, 0 0 20px #edf8ff, 0 0 0.4px #edf8ff; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="wrap"> | |
<div class="bg"></div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ハンバーガーメニュー内のリンククリック時、ハンバーガーメニューを閉じます | |
$('#sp_nav a[href]').on('click', function(event) { | |
$('#js_buttonHamburger').trigger('click'); | |
}); |