mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-09 09:57:38 +01:00
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:
parent
ba3972df2b
commit
673b6b534f
@ -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
Block a user