0815

Du musst dich anmelden um Beiträge und Themen zu erstellen. Einloggen · Registrieren

Display Posts from Exactly One Year Ago

Use this code to display posts that are exactly one year old:

<?php 
$current_day = date('j');
$last_year   = date('Y')-1; 
?>
<?php query_posts('day='.$current_day.'&year='.$last_year); 
	if (have_posts()): while (have_posts()) : the_post(); ?>

	<h1><?php the_title(); ?></h1>
	<?php the_excerpt(); ?>

<?php endwhile; endif; ?>

To display posts from different days or different years, edit the two variables in the beginning of the method.




0