Ticket #12601: 12601.2.diff
File 12601.2.diff, 970 bytes (added by , 15 years ago) |
---|
-
canonical.php
367 367 368 368 $where = $wpdb->prepare("post_name LIKE %s", get_query_var('name') . '%'); 369 369 370 // if any of post_type, year, monthnum, or day are set, use them to refine the query370 // If any query variables are present that can refine the query, use them 371 371 if ( get_query_var('post_type') ) 372 372 $where .= $wpdb->prepare(" AND post_type = %s", get_query_var('post_type')); 373 elseif ( get_query_var('name') && ! get_query_var('pagename') ) // If the request has specified a "name" var, but not a "pagename" var, it's a request matched upon the Post Permalink structure. not a page structure. 374 $where .= $wpdb->prepare(" AND post_type = %s", 'post'); 375 373 376 if ( get_query_var('year') ) 374 377 $where .= $wpdb->prepare(" AND YEAR(post_date) = %d", get_query_var('year')); 375 378 if ( get_query_var('monthnum') )