Ticket #10605: 10605.2.diff
| File 10605.2.diff, 713 bytes (added by , 16 years ago) |
|---|
-
wp-includes/query.php
1596 1596 if ( $this->is_search ) 1597 1597 $q['post_type'] = 'any'; 1598 1598 else 1599 $q['post_type'] = ' post';1599 $q['post_type'] = ''; 1600 1600 } 1601 1601 $post_type = $q['post_type']; 1602 1602 if ( !isset($q['posts_per_page']) || $q['posts_per_page'] == 0 ) … … 2078 2078 $where .= " AND $wpdb->posts.post_type = 'attachment'"; 2079 2079 } elseif ($this->is_page) { 2080 2080 $where .= " AND $wpdb->posts.post_type = 'page'"; 2081 } else if ($this->is_single){2081 } else { 2082 2082 $where .= " AND $wpdb->posts.post_type = 'post'"; 2083 2083 } 2084 2084