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
if ( window.matchMedia( '(min-width: 600px)' ).matches){
//画面幅600px以下の場合の処理
} else {
// それ以外の処理
}
<?php echo do_shorcode( '[mwform_formkey slug="form-contact"]' ); ?>
<div class="breadcrumbs" typeof="BreadcrumbList" vocab="https://schema.org/">
<?php if ( function_exists( 'bcn_display' ) ) {
bcn_display();
}?>
</div>
.is-sticky {
position: -webkit-sticky;
position: sticky;
top: 0;
}
<div class="map-wrap">
<iframe src="https://maps.google.co.jp/maps?output=embed&q=ここに住所が入ります&z=16" width="1000" height="400" frameborder="0" scrolling="no" ></iframe>
<!--パラメータは適時変更してください -->
</div>
add_filter( 'widget_tag_cloud_args', 'my_widget_tag_cloud_args');
function my_widget_tag_cloud_args( $args) {
$args = array(
'smallest' => 10, // 最小のフォントサイズ:8[デ]
'largest' => 15, // 最大のフォントサイズ:22[デ]
'unit' => // フォントサイズ単位:'pt'[デ] CSSで使用できる単位pt, px, em, %
'number' => 20, // 表示タグ数の上限:45[デ]
'format' => // 表示フォーマット:'flat'(横並び)[デ]、'list'(縦並び &lt;li&gt;&lt;/li&gt;)、'array'(表示されない。他のPHPコード用に使用する場合)
'separator' => // 表示タグ毎の区切り '\n'[デ] (スペース)
'orderby' => // 並び替項目 'name'[デ](タグ名)、'count'(投稿数)
$paged = get_query_var('paged')? get_query_var('paged') : 1; //pagedに渡す変数
$args = array(
'post_type' => 'program',
'posts_per_page' => 5, //posts_per_pageの指定
'paged' => $paged, //pagedの指定
);
$the_query = new WP_Query($args);
if ($the_query->have_posts()) :
while ($the_query->have_posts()) : $the_query->the_post();
/*--------------------------------------------------------------
style for WP Pagenavi plugin
--------------------------------------------------------------*/
.p-pagenavi {
.wp-pagenavi {
.page {
}
.previouspostslink {
}
.page.smaller {
{
"name": "oleinpress-weblog",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"browsersync": "browser-sync start -p 'oleinpressweblog.wordpress' -f '**/*' 'assets/**'",
"cleanup:css": "rimraf assets/css && mkdir -p assets/css",
"cleanup:js": "rimraf assets/js && mkdir -p assets/js",
"cleanup:images": "rimraf assets/images && mkdir -p assets/images",