Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time
* @package WordPress
* @subpackage Tersus
Template Name: Archives
<?php get_header(); ?>
<section id="content">
$years = $wpdb->get_col("SELECT DISTINCT YEAR(post_date) FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post' ORDER BY post_date DESC");
foreach($years as $year) :
$my_query = new WP_Query('year='.$year);
while ($my_query->have_posts()) : $my_query->the_post();
<h3><a href="<?php echo get_year_link($year); ?>" title="<?php $year ?> Archives"><?php $year ?></a></h3>
$months = $wpdb->get_col("SELECT DISTINCT MONTH(post_date) FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post' AND YEAR(post_date) = $year ORDER BY post_date ASC");
foreach($months as $month) :
$tstamp = mktime(0, 0, 0, $month, 1, $year);
<li class="m<?php $month ?>"><a href="<?php echo get_month_link($year, $month); ?> " title="<?php echo date("M", $tstamp); ?> <?php $year?>"><span><?php echo date("m", $tstamp); ?></span></a></li>
<?php endforeach; ?>
<?php endforeach; ?>
<?php wp_tag_cloud(''); ?>
<?php wp_list_categories('style=list&title_li='); ?>
<?php get_footer(); ?>