WordPress.org

Make WordPress Core

Changeset 11822


Ignore:
Timestamp:
08/15/09 10:57:56 (6 years ago)
Author:
azaozz
Message:

Fix displaying pages and attachments, props dd32, see #10605

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/query.php

    r11817 r11822  
    15971597                $q['post_type'] = 'any'; 
    15981598            else 
    1599                 $q['post_type'] = 'post'; 
     1599                $q['post_type'] = ''; 
    16001600        } 
    16011601        $post_type = $q['post_type']; 
     
    20792079        } elseif ($this->is_page) { 
    20802080            $where .= " AND $wpdb->posts.post_type = 'page'"; 
    2081         } elseif ($this->is_single) { 
     2081        } else { 
    20822082            $where .= " AND $wpdb->posts.post_type = 'post'"; 
     2083            $post_type = 'post'; 
    20832084        } 
    20842085 
Note: See TracChangeset for help on using the changeset viewer.