Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php $cur_y = get_the_time('Y'); ?>
- <?php $cur_m = get_the_time('m'); ?>
- <?php $off = 1; ?>
- <?php if($cur_m == 12) {
- $next_m = 1;
- $next_y = $cur_y + $offset;
- } elseif ($cur_m != 12) {
- $next_m = $cur_m + $off;
- $next_y = $cur_y;
- } ?>
- <?php if($cur_m == 1) {
- $last_m = 12;
- $last_y = $cur_y - $offset;
- } elseif ($cur_m != 1) {
- $last_m = $cur_m - $off;
- $last_y = $cur_y;
- } ?>
- <?php $prev_m = $cur_m - $off; ?>
- <?php $m_prev=query_posts('year=$prev_y&monthnum=$prev_m'); ?>
- <?php wp_reset_query(); ?>
- <?php $m_next=query_posts('year=$next_y&monthnum=$next_m'); ?>
- <?php wp_reset_query(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement