Skip to content

Instantly share code, notes, and snippets.

View Olein-jp's full-sized avatar
🏠
Working from home

Koji Kuno Olein-jp

🏠
Working from home
View GitHub Profile
@Olein-jp
Olein-jp / index.php
Last active November 27, 2019 00:48
<header
class="hogehoge"
<?php if ( has_post_thumbnail() ) : ?>
style="background-image: url(<?php echo wp_get_attachment_url( get_post_thumbnail_id() ); ?>)"
<?php endif; ?>
>
$ wp plugin install debug-bar query-monitor log-deprecated-notices monster-widget developer theme-check --activate
$('.p-faq__dt').on( 'click', function() {
$(this).next().slideToggle();
$(this).toggleClass( 'is-open' );
});
<div id="modal-id" class="modal modal-open">
<button class="modal-close">X</button>
</div>
.table-wrap {
display: block;
overflow-x: scroll;
white-space: nowrap;
overflow-scrolling: touch;
}
var pagetop = $('#page_top'); //ボタンを指定
pagetop.hide();
$(window).scroll(function () {
if ($(this).scrollTop() > 100) {
pagetop.fadeIn();
} else {
pagetop.fadeOut();
}
});
/* 見出し全体
------------------------------*/
h2,
h3,
h4,
h5,
h6 {
}
@Olein-jp
Olein-jp / add-style-for-my-snow-monkey.php
Last active March 26, 2021 04:56
My Snow Monkey にオリジナルCSSスタイルファイルを読み込み
<?php
/**
* オリジナルCSS読み込み
*/
function od_enqueue_scripts()
{
wp_enqueue_style('od_styles', plugins_url('style.css', __FILE__));
}
add_action('wp_enqueue_scripts', 'od_enqueue_scripts');
@Olein-jp
Olein-jp / add-editor-style-for-my-snow-monkey.php
Last active March 26, 2021 04:58
My Snow Monkey にエディタースタイル用CSSファイルを読み込み
<?php
/**
* Editor style
*/
function oleindesign_editor_style_register()
{
wp_enqueue_style('oleindesign-editor-style', plugins_url('editor-style.css', __FILE__));
}
add_action('enqueue_block_editor_assets', 'oleindesign_editor_style_register');
/**
* 編集画面でカスタムタクソノミーを一覧表示(チェックボックス)させる
*/
add_action(
'init',
function() {
$tag_slug_args = get_taxonomy('jobs_skill');
$tag_slug_args->hierarchical = true;
$tag_slug_args->meta_box_cb = 'post_categories_meta_box';
register_taxonomy('jobs_skill', 'jobs', (array) $tag_slug_args);