Only show months that actually have attachments.

git-svn-id: https://develop.svn.wordpress.org/trunk@7288 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg 2008-03-14 08:39:07 +00:00
parent c690eedcef
commit 39bf76b0f0
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 );