Ticket #19693: 19693.3.diff
File 19693.3.diff, 705 bytes (added by , 12 years ago) |
---|
-
wp-includes/canonical.php
493 493 if ( get_query_var('post_type') ) 494 494 $where .= $wpdb->prepare(" AND post_type = %s", get_query_var('post_type')); 495 495 else 496 $where .= " AND post_type IN ('" . implode( "', '", get_post_types( array( 'public' => true ) ) ) . "')";496 $where .= " AND post_type IN ('" . implode( "', '", get_post_types( array( 'public' => true, 'publicly_queryable' => true ) ) ) . "')"; 497 497 498 498 if ( get_query_var('year') ) 499 499 $where .= $wpdb->prepare(" AND YEAR(post_date) = %d", get_query_var('year'));