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:
parent
c690eedcef
commit
39bf76b0f0
|
@ -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 );
|
||||
|
||||
|
|
Loading…
Reference in New Issue