Skip to content

Commit 15b18d0

Browse files
committed
fixed query
1 parent ec6e16e commit 15b18d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wpdb-status.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function __construct() {
104104
echo '<pre><code>wp post delete $(wp post list --post_status=trash --format=ids)</code></pre>';
105105

106106
echo '<h2>WP Post without title: ';
107-
$posts = $this->db_query( "SELECT ID FROM " . DB_PREFIX . "posts WHERE post_title='' AND post_status!='auto-draft' AND (post_type='post' OR post_type='page')" );
107+
$posts = $this->db_query( "SELECT ID FROM " . DB_PREFIX . "posts WHERE post_title='' AND post_status!='auto-draft' AND post_status!=\'draft\' AND post_status!=\'trash\' AND (post_type='post' OR post_type='page')" );
108108
echo '<span style="color:red;">' . $posts->num_rows . '</span>';
109109
echo '</h2>';
110110

0 commit comments

Comments
 (0)