質問編集履歴
1
シングルクオートが抜けていたので修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
|
17
17
|
```php
|
18
18
|
|
19
|
-
<?php $numposts = $wpdb->get_var("SELECT count(*) FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'news");
|
19
|
+
<?php $numposts = $wpdb->get_var("SELECT count(*) FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'news’");
|
20
20
|
|
21
21
|
if (0 < $numposts)
|
22
22
|
|
@@ -32,7 +32,7 @@
|
|
32
32
|
|
33
33
|
```php
|
34
34
|
|
35
|
-
<?php $numposts = $wpdb->get_var("SELECT count(*) FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'news");
|
35
|
+
<?php $numposts = $wpdb->get_var("SELECT count(*) FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'news’");
|
36
36
|
|
37
37
|
if (0 < $numposts)
|
38
38
|
|