質問編集履歴
2
コードの追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -115,4 +115,32 @@
|
|
115
115
|
wp_reset_postdata();
|
116
116
|
}
|
117
117
|
?>
|
118
|
+
```
|
119
|
+
|
120
|
+
|
121
|
+
追記↓
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
```ここに言語を入力
|
127
|
+
|
128
|
+
<script type="text/javascript">
|
129
|
+
(function($) {
|
130
|
+
$(document).ready(function() {
|
131
|
+
$('.tab_area:first').show();
|
132
|
+
$('.tab-1 li:first').addClass('active');
|
133
|
+
|
134
|
+
$('.tab-1 li').click(function() {
|
135
|
+
$('.tab-1 li').removeClass('active');
|
136
|
+
$(this).addClass('active');
|
137
|
+
$('.tab_area').hide();
|
138
|
+
|
139
|
+
$(jQuery(this).find('a').attr('href')).fadeIn();
|
140
|
+
return false;
|
141
|
+
});
|
142
|
+
});
|
143
|
+
})(jQuery);
|
144
|
+
</script>
|
145
|
+
|
118
146
|
```
|
1
コードの追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -94,4 +94,25 @@
|
|
94
94
|
<div class="btn__more">
|
95
95
|
<a href="<?php echo get_category_link('');?>">もっと見る</a>
|
96
96
|
</div>
|
97
|
+
```
|
98
|
+
|
99
|
+
|
100
|
+
```
|
101
|
+
// カテゴリ別新着
|
102
|
+
function cat_post_list( $show_num, $cat_id ) {
|
103
|
+
global $post;
|
104
|
+
$args = array( 'posts_per_page' => $show_num, 'cat' => $cat_id );
|
105
|
+
$myposts = get_posts( $args );
|
106
|
+
foreach( $myposts as $post ) {
|
107
|
+
setup_postdata($post);
|
108
|
+
?>
|
109
|
+
<li>
|
110
|
+
<a href="<?php the_permalink(); ?>" class="cate-title">
|
111
|
+
<?php the_title(); ?></a>
|
112
|
+
</li>
|
113
|
+
<?php
|
114
|
+
}
|
115
|
+
wp_reset_postdata();
|
116
|
+
}
|
117
|
+
?>
|
97
118
|
```
|