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="menu__tabscover" id="Menu"> | |
<ul class="menu__tab"> | |
<li><a href="#menuA" class="active">メニューA</a></li> | |
<li><a href="#menuB">メニューB</a></li> | |
<li><a href="#menuC">メニューC</a></li> | |
</ul> | |
<section id="menuA" class="menuA_cont tabcont--hide"> | |
<?php $fieldloops = $cfs->get('menuAloop'); | |
foreach ($fieldloops as $fieldloop) { ?> | |
<div><?php echo $fieldloop['menuA']; ?></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
.tabcont--hide { | |
display: 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() { | |
if ($('#menu')[0]) { | |
var $tabcontAry = [$('#menuA'), $('#menuB'), $('#menuC')]; | |
$('.menu__tab a').off().on('click', function() { | |
if (!$(this).hasClass('active')) { | |
$('.menu__tab a').removeClass('active'); | |
$(this).addClass('active'); | |
var clickdNum = $('.menu__tab a').index($(this)); | |
for (var i = 0; i < $tabcontAry.length; i++) { | |
$tabcontAry[i].hide(); |
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 auto_post_slug( $slug, $post_ID, $post_status, $post_type ) { | |
if ( preg_match( '/(%[0-9a-f]{2})+/', $slug ) ) { | |
$slug = utf8_uri_encode( $post_type ) . '-' . $post_ID; | |
} | |
return $slug; | |
} | |
add_filter( 'wp_unique_post_slug', 'auto_post_slug', 10, 4 ); |
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
add_filter( 'wp_calculate_image_srcset', '__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
<?php | |
wp_deregister_script( 'jquery' ); | |
wp_enqueue_script('jquery','/js/jquery.js'); | |
wp_head(); | |
?> |
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
/*-------------------------------------------*/ | |
/* ヘッダー画像の推奨サイズを変更します | |
/*-------------------------------------------*/ | |
add_filter( 'twentyten_header_image_width', create_function( '' , 'return 1050;' ) ); | |
add_filter( 'twentyten_header_image_height', create_function( '' , 'return 430;' ) ); |
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 post_has_archive( $args, $post_type ) { | |
if ( 'post' == $post_type ) { | |
$args['rewrite'] = true; | |
$args['has_archive'] = 'newsrelease'; // ページ名 | |
} | |
return $args; |
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($wp_query->queried_object->parent == 0) : | |
$term_id = $wp_query->queried_object->term_id; | |
$taxonomy_name = $wp_query->queried_object->taxonomy; | |
$termchildren = get_term_children( $term_id, $taxonomy_name ); | |
foreach ( $termchildren as $child ) : | |
$taxs[] = $child; | |
endforeach; |
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 ( has_term('カスタム分類名', 'カスタム投稿タイプ名') ) { ?> | |
AAAAAA | |
<?php } elseif ( has_term('カスタム分類名', 'カスタム投稿タイプ名') ) { ?> | |
BBBBBB | |
<?php } ?> |
OlderNewer