Projects Archive

 

$last_year = 0;
query_posts(array('category_name' => ‘projekty’, ‘posts_per_page’ => -1 ));
if (have_posts()) :
while (have_posts()) :
the_post();
$year = substr(get_the_date(), -4);
if ($year != $last_year)
{
$last_year = $year;
echo(‘

‘.$last_year.’

‘);
}
?>