質問編集履歴
5
ソースコード一部訂正
test
CHANGED
File without changes
|
test
CHANGED
@@ -22,7 +22,11 @@
|
|
22
22
|
|
23
23
|
```php
|
24
24
|
|
25
|
-
<?php $args = array(
|
25
|
+
<?php $args = array(
|
26
|
+
|
27
|
+
//いろいろ
|
28
|
+
|
29
|
+
); ?>
|
26
30
|
|
27
31
|
<div class="count<!-- A -->">
|
28
32
|
|
4
ソースコード一部訂正
test
CHANGED
File without changes
|
test
CHANGED
@@ -22,7 +22,7 @@
|
|
22
22
|
|
23
23
|
```php
|
24
24
|
|
25
|
-
<?php $args = array(
|
25
|
+
<?php $args = array( 'posts_per_page' => -1 ); ?>
|
26
26
|
|
27
27
|
<div class="count<!-- A -->">
|
28
28
|
|
3
<?php ;?>の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -22,11 +22,7 @@
|
|
22
22
|
|
23
23
|
```php
|
24
24
|
|
25
|
-
$args = array(
|
26
|
-
|
27
|
-
|
25
|
+
<?php $args = array( // いろいろ );?>
|
28
|
-
|
29
|
-
);
|
30
26
|
|
31
27
|
<div class="count<!-- A -->">
|
32
28
|
|
2
修正依頼を受けてソースコードを追加しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -22,7 +22,15 @@
|
|
22
22
|
|
23
23
|
```php
|
24
24
|
|
25
|
+
$args = array(
|
26
|
+
|
27
|
+
// いろいろ
|
28
|
+
|
29
|
+
);
|
30
|
+
|
25
31
|
<div class="count<!-- A -->">
|
32
|
+
|
33
|
+
<?php $the_query = new WP_Query( $args );?>
|
26
34
|
|
27
35
|
<?php if ( $the_query->have_posts() ) : ?>
|
28
36
|
|
1
AB変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
|
17
17
|
```
|
18
18
|
|
19
|
-
上の関数では下記の
|
19
|
+
上の関数では下記の``// B``でしか使えませんが、クラス付与したいのは下記の``<!-- A -->``なんです。
|
20
20
|
|
21
21
|
|
22
22
|
|
@@ -28,7 +28,7 @@
|
|
28
28
|
|
29
29
|
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
|
30
30
|
|
31
|
-
<?php echo loopPostCount(); //B ?>
|
31
|
+
<?php echo loopPostCount(); // B ?>
|
32
32
|
|
33
33
|
<h2><?php the_title(); ?></h2>
|
34
34
|
|