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
<label class="radio"> | |
<input name="stores_charge" class="radio_input" type="radio" checked> | |
<span class="radio_text">全て</span> | |
</label> |
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(get_post_meta($post->ID,'text5',true)): ?> | |
<h3>タイトルが入ります</h3> | |
<?php echo $cfs->get('text5'); ?> | |
<?php endif; ?> | |
// チェックボックスを使った分岐 | |
<?php if ( get_post_meta($post->ID,'box',TRUE) ): ?> | |
チェックボックスにチェックをいれるとこの文章が表示されます。 | |
<?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
<h1 class="subtitle subtitle3">hoge</h1> |
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() { | |
let tabs = $(".tab"); // tabのクラスを全て取得し、変数tabsに配列で定義 | |
$(".tab").on("click", function() { // tabをクリックしたらイベント発火 | |
$(".active").removeClass("active"); // activeクラスを消す | |
$(this).addClass("active"); // クリックした箇所にactiveクラスを追加 | |
const index = tabs.index(this); // クリックした箇所がタブの何番目か判定し、定数indexとして定義 | |
$(".content").removeClass("show").eq(index).addClass("show"); // showクラスを消して、contentクラスのindex番目にshowクラスを追加 | |
}) | |
}) |
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 () { | |
// #で始まるアンカーをクリックした場合に処理 | |
$('a[href^="#"]'+ 'a,area').click(function () { | |
var speed = 400; | |
var href = $(this).attr("href"); | |
var target = $(href == "#" || href == "" ? 'html' : href); | |
var position = target.offset().top; | |
$('body,html').animate({ scrollTop: position }, speed, 'swing'); | |
return false; |
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 { | |
background: linear-gradient(to bottom, transparent 0%, transparent 70%, #fff 100%), url(./images/bg.jpg); | |
background-repeat: no-repeat; | |
background-position: center top; | |
background-size: cover; | |
} |
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
@media(min-width: 769px){ | |
a[href^="tel:"]{ | |
pointer-events: none; | |
} | |
} |
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 my_tiny_mce_before_init( $init_array ) { | |
$init_array['valid_elements'] = '*[*]'; | |
$init_array['extended_valid_elements'] = '*[*]'; | |
return $init_array; | |
} | |
add_filter( 'tiny_mce_before_init' , 'my_tiny_mce_before_init' ); |
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 login_logo() { | |
echo '<style type="text/css">.login h1 a {background-image: url('.get_bloginfo('template_directory').'/images/login-logo.png);width:●●px;height:●●px;background-size:●●px ●●px;}</style>'; | |
} | |
add_action('login_head', 'login_logo'); | |
// ログイン画面のロゴURL | |
function custom_login_logo_url() { | |
return get_bloginfo( 'url' ); | |
} |
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
// デフォルトテーマのCSSを読み込まないようにします | |
add_action('wp_enqueue_scripts', function () { | |
$styles = wp_styles(); | |
$styles->add_data('twentytwenty-style', 'after', array()); | |
}, 20); |
NewerOlder