質問編集履歴

5

ソースコード一部訂正

2018/12/10 19:03

投稿

makirons
makirons

スコア20

test CHANGED
File without changes
test CHANGED
@@ -22,7 +22,11 @@
22
22
 
23
23
  ```php
24
24
 
25
- <?php $args = array( 'posts_per_page' => -1 ); ?>
25
+ <?php $args = array(
26
+
27
+ //いろいろ
28
+
29
+ ); ?>
26
30
 
27
31
  <div class="count<!-- A -->">
28
32
 

4

ソースコード一部訂正

2018/12/10 19:03

投稿

makirons
makirons

スコア20

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 ;?>の追加

2018/12/10 19:01

投稿

makirons
makirons

スコア20

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

修正依頼を受けてソースコードを追加しました。

2018/12/10 19:00

投稿

makirons
makirons

スコア20

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変更

2018/12/10 19:00

投稿

makirons
makirons

スコア20

test CHANGED
File without changes
test CHANGED
@@ -16,7 +16,7 @@
16
16
 
17
17
  ```
18
18
 
19
- 上の関数では下記のでしか使えませんが、クラス付与したいのは下記のなんです。
19
+ 上の関数では下記の``// ``でしか使えませんが、クラス付与したいのは下記の``<!-- -->``なんです。
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