Only show months that actually have attachments.

git-svn-id: http://svn.automattic.com/wordpress/trunk@7288 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
matt 2008-03-14 08:39:07 +00:00
parent ba3972df2b
commit 673b6b534f
1 changed files with 1 additions and 1 deletions

View File

@ -142,7 +142,7 @@ if ( $page_links )
<?php
if ( !is_singular() ) :
$arc_query = "SELECT DISTINCT YEAR(post_date) AS yyear, MONTH(post_date) AS mmonth FROM $wpdb->posts WHERE post_type = 'post' ORDER BY post_date DESC";
$arc_query = "SELECT DISTINCT YEAR(post_date) AS yyear, MONTH(post_date) AS mmonth FROM $wpdb->posts WHERE post_type = 'attachment' ORDER BY post_date DESC";
$arc_result = $wpdb->get_results( $arc_query );