DocumentationOnline documentation for Ajax Load More
Date Archives
The code below will display an archive of posts by date (day/month/year).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
<?php // archive.php get_header(); $year = get_the_date('Y'); $month = get_the_date('m'); $day = get_the_date('d'); if(is_year()){ echo '<h1>'. the_date('Y') .'</h1>'; echo do_shortcode('[ajax_load_more year="' . $year . '"]'); } if(is_month()){ echo '<h1>'. the_date('F, Y') .'</h1>'; echo do_shortcode('[ajax_load_more year="' . $year . '" month="' . $month . '"]'); } if(is_day()){ echo '<h1>'. the_date('F jS, Y') .'</h1>'; echo do_shortcode('[ajax_load_more year="' . $year . '" month="' . $month . '" day="' . $day . '"]'); } get_footer(); ?> |