親タームをカテゴリ枠化して小タームのターム名題と記事一覧のセットでフォーチ

TMプリントのボディーで使用

フォーチ2回まわす。
その中でループ

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?php
 
 
 ///宣言------------------------------------------
$args = array(
'parent'       => 0,
'hierarchical' => 0,
'orderby'      => 'term_order', // Category Order and Taxonomy Terms Order を使用
'order'        => 'ASC'
);
    $taxonomy_name = 'body_cat';
    $taxonomys = get_terms($taxonomy_name,$args);
    if(!is_wp_error($taxonomys) && count($taxonomys)):
        foreach($taxonomys as $taxonomy_term):////フォーチ----------------------------?>
         <h3 class="body_title2" style="margin-bottom:30px;"><?php echo $taxonomy_term->name;?><span class="d_price"></span></h3>
         
        <?php
        $url = get_term_link($taxonomy_term->slug, $taxonomy_name);
         
        $taxonomy_term_childrens = get_term_children( $taxonomy_term->term_id, $taxonomy_name );
            if(!is_wp_error($taxonomy_term_childrens) && count($taxonomy_term_childrens)):
             foreach($taxonomy_term_childrens as $taxonomy_term_children_id):
    $taxonomy_term_children = get_term_by('id',$taxonomy_term_children_id,$taxonomy_name);
    //echo $taxonomy_term_children_id  
?>
 
 
 
<h4 class="body_cat_child">
<?php
echo $taxonomy_term_children->name;
?>
 
 
</h4>
 
     
     
    <div class="body_box_all">
 <?php
$args = array(
        'posts_per_page' => -1,
//'orderby' => 'menu_order',
//'order' => 'ASC',
'tax_query' => array(
            'relation' => 'AND',
            array(
                'taxonomy' => $taxonomy_name,
                'field' => 'slug',
                'terms' => array( $taxonomy_term_children->slug ),
//'operator'=>'NOT IN'
                ),
),
//カテ例 'cat'=> 4,
//カテ複数例 'cat'=> array(4,6)
 
    );
?>
 
<?php
    query_posts( $args );
?>  
<?php
if ( have_posts () ) :
    while ( have_posts() ) :
        the_post();
?>
 
<?php include("roop_body.php"); ?>
 
 
<?php
    endwhile;
endif;
?>
 
 
 
<?php wp_reset_query(); ?>
 
 
 
</div>
 
<!----->
<?php endforeach; endif; ?>
<?php endforeach; endif; ?>

d-making の 広告カテゴリ一覧 に新着NEWを 1ヶ月以内に 投稿された記事があれば

ポイントというか
ハマった点は
get post の
cat =>
ではタームID?
ゲットがテゴリーでとった id では
だめだめで

けっか
タックスクエリーをしなきゃいかんかった

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<div class="disign_cate_box_all">
 
<?php
$cat_tax= 'd_cate_jirei';
$filed ='d_jirei_cat_img';
$args = array(
    'type'                     => 'post',
    'child_of'                 => 0,
    'parent'                   => 0,//0で親かてのみ ''で子もでる
    'orderby'                  => 'name',
    'order'                    => 'ASC',
    'hide_empty'               => 0,
    'hierarchical'             => 1,
    'exclude'                  => '',
    'include'                  => '',
    'number'                   => '',
    'taxonomy'                 => $cat_tax,
    'pad_counts'               => false ,
    'exclude'                  => '321,322'
);
$categories = get_categories($args);
//$categories = get_categories('parent=0'); 親カテゴリーのみ
foreach($categories as $category) :
  
$cat_id = $category->cat_ID;
$post_id = $cat_tax.'_'.$cat_id;
    
$catimg = get_field($filed,$post_id);
$img = wp_get_attachment_image_src($catimg,W214_142);
 
$disp = get_field('d_jirei_cat_disp',$post_id);
$catekakaku1 = get_field('catekakaku1',$post_id);
$catekakaku2 = get_field('catekakaku2',$post_id);
$catekakaku3 = get_field('catekakaku3',$post_id);
 
 
 
?>
 
 
 
<div class="disign_cate_box">
 
<h3 class="disign_cate_box_title"><i class="icon-quote-left"></i><?php echo $category->cat_name; ?></h3>
 
             
 
 <div style="position:relative; margin-bottom:20px;">
 
<div class="disign_cate_box_img_box">
<div class="dcent">
<?php
// 1ヶ月以内に投稿された記事を取得して、あればNEWを出力する
$three_month_ago = date('Y-m-d 0:0:0', strtotime('-1 month'));//何ヶ月か?
$cat_current   = $category->slug; //現在のカテゴリID
$mydata = get_posts(
array'post_type' => 'd_jirei',
        'date_query' => array(
            array(
            'after'     => $three_month_ago//何ヶ月か
            'inclusive' => true
                    ),
                                ),
            'tax_query' => array(
            'relation' => 'AND',
            array(
                'taxonomy' => $cat_tax,
                'field' => 'slug',
                'terms' => $cat_current,
//'operator'=>'NOT IN'
                ),
),
    )
);
?>
<?php 
if( !empty( $mydata ) ) {
    echo '<div class="new_icon"><img src="/img/new_icon/rainbow1.gif" width="31" height="12" alt="愛知県春日井市ホームページ制作NEW記事"></div>';
?>
     
<?php
}
wp_reset_postdata();
?>      
<a href="/デザイン事例カテゴリ/<?php echo $category->category_nicename; ?>" style="background-color:#FFF">
<img src="<?php if($img):
echo $img[0];
else:
echo '/img/no_photo_214_142.jpg';
endif;
 ?>" alt="<?php echo $category->cat_name; ?>" /></a></div></div>
 
<?php
 echo $disp
 ?>
<div style="clear:both;"></div>
<a href="/デザイン事例カテゴリ/<?php echo $category->category_nicename; ?>" class="d_cate_tuduki mailform_bottan">制作実績をみる</a>
</div>
 
<?php if($catekakaku1):?>
<table><caption>料金の目安</caption><tr><td><?php echo $catekakaku1; ?></td><td><?php echo $catekakaku2; ?></td></tr></table>
<?php endif; ?>
<div style="font-size:80%; padding:12px;">
<?php echo$catekakaku3; ?>
</div>
</div>
 
 
<?php endforeach; ?>
<div style="clear:both;"></div>
 
 
 
 
 
</div>
 
 
 
 
</div class="jirei_box_all">

http://notebook.yamamotohiroyuki.com/wordpress/2012/08/15/%E3%81%A1%E3%82%87%E3%81%84%E3%81%A1%E3%82%87%E3%81%84%E5%BF%98%E3%82%8C%E3%82%8B%E3%80%8Ewp_query%E3%80%8F%E3%81%AE%E4%BD%BF%E3%81%84%E6%96%B9/

1
2
3
4
5
6
7
8
9
10
11
12
13
<?php
$args = array(
  'cat' => 1,
  'posts_per_page' => 5
);
$the_query = new WP_Query( $args );
if ( $the_query->have_posts() ) :
  while ( $the_query->have_posts() ) : $the_query->the_post();
endwhile;
  //ここにループするテンプレート
endif;
wp_reset_postdata();
?>

http://www.tam-tam.co.jp/tipsnote/cms/post6697.html

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
// 2015年9月10日から、2015年10月10日までに投稿された記事を取得して、タイトルを出力する
$mydata = get_posts( array(
    'posts_per_page' => -1,
    'date_query' => array(
        array(
            'after' => array(
                'year' => 2015,
                'month' => 9,
                'day' => 10,
            ),
            'before' => array(
                'year' => 2015,
                'month' => 10,
                'day' => 10,
            ),
            'inclusive' => true,
        ),
    ),
) );
if( !empty( $mydata ) ) {
    foreach( $mydata as $post ) {
        setup_postdata( $post );
?>
<h1><?php the_title(); ?></h1>
<?php
    }
}
?>

このへんとかは カテゴリ で ポストだったでよかったんだな

何ヶ月いないは
これ参考
http://bugpixel.net/output/web/date_query-wordpress/

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
$cats = get_the_category();
$cat = $cats[0];
$cat_current   = $cat->cat_ID; //現在のカテゴリID
?>
<?php
$three_month_ago = date('Y-m-d 0:0:0', strtotime('-3 month'));
$mydata = get_posts(array(
    'category'     => $cat_current,
    'date_query' => array(
        array(
            'after'     => $three_month_ago//3ヶ月
            'inclusive' => true
        ),
    )
));
?>
<ul class="link">
<?php 
if( !empty( $mydata ) ) {
    foreach( $mydata as $post ) {
        setup_postdata( $post );
?>
    <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php
    }
}
wp_reset_postdata();
?>      
</ul>

レスポンシブル参考

画像 基本 画像の横幅をウインドウ幅に合わせたいが、原寸より大きくはしたくない場合
http://tips.nishishi.com/css/image-max-width.html

1
2
3
4
5
6
7
8
img {
   width: 100%; /* 横幅に合わせて自動で拡大縮小する */
}
 
 
img {
   max-width: 100%; /* 横幅に合わせて自動縮小するが、拡大はしない */
}

アスペクト比を固定したボックス要素
http://www.panarea-is.com/%E3%83%AC%E3%82%B9%E3%83%9D%E3%83%B3%E3%82%B7%E3%83%96%E3%83%87%E3%82%B6%E3%82%A4%E3%83%B3%E3%81%A7%E3%82%82%E4%BD%BF%E3%81%88%E3%82%8B%E3%82%A2%E3%82%B9%E3%83%9A%E3%82%AF%E3%83%88%E6%AF%94%E3%82%92/

.aspectwrapper {
position: relative;
width:50%;
background:#000000;
}
.aspectwrapper:after{
padding-top: 100%;
display: block;
content: “”;
}
.aspectwrapper > .content{
position: absolute;
top: 0px;
left: 0px;
bottom: 0px;
right: 0px;
}

スマホ対応するならCSSでword-wrap:break-wordを指定しよう

http://kudox.jp/html-css/word-wrap_break-word

1
2
3
{
  word-wrap:break-word;
}

したくない要素

1
2
3
4
{
  overflow:scroll;
  word-wrap:normal;
}

テーブル

1
2
3
4
5
6
7
8
table {
  table-layout:fixed;
}
うえのほうがいい感じ
table {
  word-break:break-all;
}
これだめ

記事ループで 何個目に 広告を入れる

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php if (have_posts()) :$ransuu = rand(1, 5);
while (have_posts()) : the_post(); $loop_count++; ?>
 
 
 
<?php if ( $loop_count == $ransuu ) : ?>
  
<?php if(is_mobile()) { ?>
  
// ※ここにスマホ表示用のGoogle AdSense等の広告コードを入力
// ただしスマホ用なので横幅(width)は300px以下にすること
  
<?php } else { ?>
  
// ※ここにpc表示用のGoogle AdSense等の広告コードを入力
// pc用は横幅(width)は500px,高さ(height)は100px程度がおすすめ
  
<?php } ?>
<?php endif; ?>
 
 
 
 
<?php endwhile; else: ?>
  <p>記事がありません</p>
  <?php endif; ?>

レスポンシブ ギャラリー 強引なまとめ

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<script type="text/javascript" src="/js/jquery.imageNavigation.js"></script>
<script type="text/javascript">
      $(function(){
        $("#img_box,#img_box2").imageNavigation({
          time:2000,
          animationTime:500,
          rolloverTime: 0,
          rolloutTime: 500,
          autoPlay: false,
        });
      });
</script>
 
 
<script type="text/javascript">
$(window).on('load resize', function(){
var $w = ($('#img_box2 img.d-garabox').height());
$('.navi-image .d_respo_hight img').css("max-height", $w);
$('#img_box2 .navi-image a').css("max-height", $w);
//$('.viewer').height(w);
});
</script>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
/*---------------------------------ギャラリー-------------------------------------------------*/
#img_box2 {
    width: 640px;
/*  margin-top: 20px;*/
    margin-right: auto;
    margin-bottom: 20px;
    margin-left: auto;
    overflow: hidden;
}
#img_box2 .navi-image {
    position: relative;
    height: 480px;
    width: 640px;
    overflow: hidden;
}
#img_box2 .navi-image a {
    position: absolute;
    left: 0px;
    top: 0px;
    background-color: #FFF;
    height: 480px;
    width: 640px;
    text-align: center;
    overflow: hidden;
     
     
    /*
    position: absolute;
    left: 0px;
    top: 0px;
    background-color: #FFF;
    height: 478px;
    width: 638px;
    text-align: center;
    overflow: hidden;
    border: 1px solid #FFF;*/
}
#img_box2 .navi-image a.last-active {
    z-index: 9;
}
 
#img_box2 .navi {
    overflow: hidden;
    padding-left:1%;
    padding-right:1%;
    -moz-box-sizing: border-box;
box-sizing: border-box;
margin-top:10px;
}
 
 
 
#img_box2 .navi-image a.active {
    z-index: 10;
}
#img_box2 .navi ul{
    margin: 0px;
    padding: 0px;
/*  width: 650px;*/
}
#img_box2 .navi ul li {
    float: left;
    list-style-type: none;
    padding: 0px;
    overflow: hidden;
    /*height:52px;*/
    width: 19%;
    position: relative;
    margin-top: 0px;
    margin-right: 2px;
    margin-bottom: 2px;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
     
}
 
#img_box2 .navi ul li:after{
padding-top: 61.8%;
display: block;
content: "";
}
#img_box2 .navi ul li .img_navi{
position: absolute;
top: 0px;
left: 0px;
bottom: 0px;
right: 0px;
}
 
 
#img_box2 .navi ul li img{ width:100%; height:auto}
#img_box2 .navi-image a img{position: absolute;
    top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;}
 
#img_box2 .navi ul li a {
    margin: 0px;
    padding: 0px;
    display: block;
}
 
 
#img_box2, #img_box2 .navi-image, #img_box2 .navi-image a, #img_box2 .navi {
    width: 100%;
}
 
.d-garabox{ width: 100%;height: auto; }
 
#img_box2 .navi-image a img{ width:auto; max-width:100%; height:auto;}
 
/*ギャラリーメニュー アクティブとホバーくっきり*/
#img_box2 .navi img {
  opacity: 0.4;
  filter: alpha(opacity=40);
  -ms-filter: "alpha(opacity=40)";
  -moz-opacity: 0.4;
  -khtml-opacity: 0.4;
  zoom: 1;
}
 
.navi .active > img
{
    opacity: 1!important;
    filter: alpha(opacity=100)!important;
    -ms-filter: "alpha(opacity=100)"!important;
    -moz-opacity: 1!important;
    -khtml-opacity: 1!important;
    zoom: 1!important;
     
    }
 
 
/*ディバイススマフォ*/
@media screen and (max-width: 490px){
 
/*--------------------------------------カーシングルスマフォ*/
#img_box2{ width:100%; height:auto;}
 
#img_box2 .navi-image{ width:100%; height:auto;/*max-height:300px; min-height:200px;*/}
 
#img_box2 .navi-image a{ width:100%; /*height:auto;*/}
 
#img_box2 .navi-image a img{ width:auto; height:auto;}
 
#img_box2 .navi{ width:100%; height:auto;}
 
#img_box2 .navi ul{ width:100%; height:auto;}
 
 
 
 
 
#img_box2 .navi ul li   { width:24%}
/*初期のスマホギャラリーの高さ*/
.navi-image .d_respo_hight img,
#img_box2 .navi-image a{ max-height:251px;}
 
 
     
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<div id="img_box2">
   
 
  <div class="navi-image">
 
 
 
  
   <?php
$fields = $cfs->get('shop_gallery');
foreach ($fields as $field) :
?>
<?php
$title= get_the_title();
 $attachment_id = $field['gallery_photo'];
?>
 
 
<a href="#" onClick="return false;" class="d_respo_hight">
<?php
$car_photo = wp_get_attachment_image($attachment_id,'640_480',0,array('alt'=>$title,'title'=>$title));
echo $car_photo;
?>
</a>
<?php
endforeach;
?>
  
  <?php $hoge = get_field('car_label');
if($hoge == '店長おすすめ'): ?>
<div class="rabel_rabel">
<img src="/img/rable1_page.png" width="193" height="28" alt="店長おすすめ中古車">
</div>
 
<?php elseif($hoge == 'その他'): ?>
 
 
<?php endif; ?>
 
 
<?php //new
$days=30;
$today=date('U'); $entry=get_the_time('U');
$diff1=date('U',($today - $entry))/86400;
if ($days > $diff1) {
echo '
    <div class="rabel_new">
    <img src="/img/rable_new.png" width="54" height="54" alt="新着中古車">
    </div>
    ';
}
?>
 
  <?php //公開状態
   $hoge = get_field('car_open');
if($hoge == '10'):
 //商談中
?>  
    <div class="rabel_status">
    <img src="/img/rabel_shoudan_page.png" width="198" height="41" alt="この中古車は商談中です。">
    </div>
 <?php elseif($hoge == '1'):
  //売り切れ?>  
    <div class="rabel_status">
    <img src="/img/rabel_sold_out_page.png" width="640" height="480" alt="この中古車は完売しました。" class="d-garabox">
    </div>
<?php endif; ?>
 
<img src="/img/d-garabox_back.png" class="d-garabox">
 
 
 
  </div>
   
  <div class="navi">
<ul>
 
 
   <?php
$fields = $cfs->get('shop_gallery');
foreach ($fields as $field) :
?>
<?php
$title= get_the_title();
 $attachment_id = $field['gallery_photo'];
?>
 
 
<li><p class="img_navi"><a href="#" onClick="return false;">
<?php
$car_photo = wp_get_attachment_image($attachment_id,'140_93',0,array('alt'=>$title,'title'=>$title));
echo $car_photo;
?>
</a></p></li>
<?php
endforeach;
?>
 
 
    </ul>
  </div>
  <div style="clear:both;"></div>
   
   
 
 
  </div id="img_box2">

クリッカブルのレスポンシブ

1
2
3
4
5
6
7
8
<!--レスポンクリッカブル--->
<script type="text/javascript" src="/js/jquery.rwdImageMaps.min.js"></script>
 
<script type="text/javascript">
$(document).ready(function(e) {
    $('img[usemap]').rwdImageMaps();
});
</script>
1
2
3
4
5
6
7
8
.d_mapbox2{margin-bottom:30px; width:100%;position:relative; display:none}
 
.d_mapbox2 img[usemap] {
        border: none;
        height: auto;
        max-width: 100%;
        width: auto;
    }

ブート

1
2
3
4
@media (max-width: 768px) {
.d_mapbox{ display:none}
.d_mapbox2{ display: block}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<div class="d_mapbox2" > <img src="/img/test.png" usemap="#resp" id="#resp" width="730" height="385" alt="春日井mapメニュー"/>
            <map name="resp">
              <area shape="rect" coords="486, 195, 562, 250" href="/お店/地区/岩成台/" />
              <area shape="rect" coords="486, 139, 562, 194" href="/お店/地区/藤山台/"/>
              <area shape="rect" coords="620, 79, 703, 327" href="/お店/地区/石尾台/"/>
              <area shape="poly" coords="619, 310, 450, 311, 450, 181, 486, 181, 486, 250, 562, 250, 562, 233, 620, 233" href="/お店/地区/高蔵寺/"/>
              <area shape="poly" coords="618, 231, 621, 75, 545, 75, 545, 139, 564, 139, 564, 235, 618, 235, 615, 234" href="/お店/地区/高森台/" />
              <area shape="poly" coords="450, 7, 450, 182, 486, 182, 486, 139, 546, 139, 546, 75, 622, 75, 622, 5" href="/お店/地区/坂下/" />
              <area shape="poly" coords="450, 317, 314, 317, 314, 293, 342, 293, 342, 168, 450, 168"href="/お店/地区/南城/"/>
              <area shape="poly" coords="260, 79, 450, 78, 450, 169, 342, 169, 342, 183, 260, 183" href="/お店/地区/松原/" />
              <area shape="rect" coords="260, 182, 342, 299"  href="/お店/地区/東部/"  />
              <area shape="rect" coords="176, 9, 260, 167"  href="/お店/地区/鷹来/"  />
              <area shape="rect" coords="176, 167, 260, 295"  href="/お店/地区/柏原/"  />
              <area shape="rect" coords="24, 204, 77, 312"  href="/お店/地区/味美/"  />
              <area shape="rect" coords="74, 42, 176, 205"  href="/お店/地区/西部/" />
              <area shape="rect" coords="77, 204, 133, 353" href="/お店/地区/知多/"  />
              <area shape="poly" coords="133, 204, 133, 353, 317, 353, 317, 294, 176, 295, 176, 204" href="/お店/地区/中部/"/>
            </map>
            <!--城北線-->
            <a class="eki jyouhoku map_jyouhoku_ajiyoshi" href="/お店/最寄り駅/味美駅/城北線/#"> 味美駅</a> <a class="eki jyouhoku map_jyouhoku_kachigawa" href="/お店/最寄り駅/勝川駅/城北線/"> 勝川駅</a>
            <!--名鉄-->
            <a class="eki meitetsu map_meitetsu_ajima" href="/お店/最寄り駅/味鋺駅/名鉄/"> 味鋺駅</a> <a class="eki meitetsu map_meitetsu_ajiyoshi" href="/お店/最寄り駅/味美駅/名鉄/"> 味美駅</a> <a class="eki meitetsu map_meitetsu_kasugai" href="/お店/最寄り駅/春日井駅/名鉄/"> 春日井駅</a> <a class="eki meitetsu map_meitetsu_ushiyama" href="/お店/最寄り駅/牛山駅/名鉄/"> 牛山駅</a>
            <!--JR-->
            <a class="eki jr map_jr_kachigawa" href="/お店/最寄り駅/勝川駅/jr/"> JR 勝川駅</a> <a class="eki jr map_jr_kasugai" href="/お店/最寄り駅/春日井駅/jr/"> JR 春日井駅</a> <a class="eki jr map_jr_jinryo" href="/お店/最寄り駅/神領駅/jr/"> JR 神領駅</a> <a class="eki jr map_jr_kouzouji" href="/お店/最寄り駅/高蔵寺駅/jr/"> JR 高蔵寺駅</a> <a class="eki jr map_jr_jyoukouji" href="/お店/最寄り駅/定光寺駅/jr/"> JR 定光寺駅</a>
            <!--春日井市以外-->
            <a class="map_komaki" href="/お店/地区/小牧市/"> 小牧市</a> <a class="map_inuyama" href="/お店/地区/犬山市/"> 犬山市</a>
            <div class="eki_setumei">
              <div class="setumei se1">JR中央本線</div>
              <div class="setumei se2">名鉄小牧線</div>
              <div class="setumei se3">東海交通事業 城北線</div>
            </div>
            <div class="chiiki_setumei"> (中学校区別) </div>
          </div>

結果 ちいさすぎてつかわん

タクソノミーをドロップダウンでリンク 複数設置

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<script type="text/javascript">
function sample() {
  var browser = document.fm.s.value;
  location.href = browser;
}
</script>
<form id="dp_cat" action="#" name="fm">
<select name="s" onChange="sample()">
 
<option value="">月を選択</option>
<?php
$argv = array(
'orderby' => 'order', // PS Taxonomy Expander
);
$terms = get_terms('ciku', $argv);
foreach($terms as $value):
echo "<option value=\"/お店/地区/".$value->slug."/\">".$value->name."</option>";
endforeach;
?>
</select>
</form>
 
<script type="text/javascript">
function sample2() {
  var browser2 = document.fm2.s2.value;
  location.href = browser2;
}
</script>
<form id="dp_cat2" action="#" name="fm2">
<select name="s2" onChange="sample2()">
 
<option value="">月を選択</option>
<?php
$argv = array(
'orderby' => 'order', // PS Taxonomy Expander
);
$terms = get_terms('nearest_station', $argv);
foreach($terms as $value):
echo "<option value=\"/お店/最寄り駅/".$value->slug."/\">".$value->name."</option>";
endforeach;
?>
</select>
</form>

参考

http://blife.boo.jp/643/

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<script type=”text/javascript”>
function sample() {
  var browser = document.fm.s.value;
  location.href = browser;
}
</script>
<form id=”dp_cat” action=”#” name=”fm”>
<select name=”s” onChange=”sample()”>
<?php
$argv = array(
‘orderby’ => ‘order’, // PS Taxonomy Expander
);
$terms = get_terms(‘dptopics_category’, $argv);
foreach($terms as $value):
echo “<option value=\””.WWW_URL.”dptopics/”.$value->taxonomy.”/”.$value->slug.”/\”>”.$value->name.”</option>”;
endforeach;
?>
</select>
</form>

お気にに入れたが
検索を使って 複数条件でタクソノミー を 検索

http://satohmsys.info/wordpress-searchbox-dropdown/
zip保存
アーカイブ