get_results($wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND (comment_approved = '1' OR ( user_id = %d AND comment_approved = '0' ) ) ORDER BY comment_date", $post->ID, $user_ID)); } else { if ( empty($comment_author) ) { $comments = $wpdb->get_results($wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved = '1' ORDER BY comment_date", $post->ID)); } else { $comments = $wpdb->get_results($wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND ( comment_approved = '1' OR ( comment_author = %s AND comment_author_email = %s AND comment_approved = '0' ) ) ORDER BY comment_date", $post->ID, $comment_author, $comment_author_email)); } } // keep $comments for legacy's sake (remember $table*? ;) ) $comments = $wp_query->comments = apply_filters( 'comments_array', $comments, $post->ID ); $wp_query->comment_count = count($wp_query->comments); update_comment_cache($comments); echo "\n" . '
' . "\n"; if (have_posts()) { while (have_posts()) { the_post(); echo "\n" . ' ' . "\n" . '
' . "\n" . '
' . "\n" . '

' . the_title( '', '', false ) . '

' . "\n" . '
' . "\n"; the_content('

' . __('Read the rest of this entry »', 'german_newspaper') . '

'); wp_link_pages(array('before' => '

' . __('Pages:', 'german_newspaper') . ' ', 'after' => '

', 'next_or_number' => 'number')); echo "\n" . ' ' . "\n" . '
' . "\n" . ' ' . "\n" . '
' . "\n" . '
' . "\n\n"; comments_template(); } } else { echo "\n" . '

' . __('Sorry, no posts matched your criteria.', 'german_newspaper') . '

' . "\n\n"; } echo "\n" . '
' . "\n\n"; get_footer(); ?>