Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
- $args = array(
- 'order' => 'DESC',
- 'orderby' => 'date',
- 'paged' => $paged,
- 'post_type' => 'issue',
- 'posts_per_page' => 1
- );
- $the_query = new WP_Query( $args );
- if ($the_query->have_posts()) :?>
- <section class="clearfix container issue-nav">
- <?php if (get_option('am_email')): ?>
- <a class="contact-email fl" href="mailto:<?php echo get_option('am_email'); ?>"><?php echo htmlentities ( get_option('am_email') , ENT_QUOTES, 'UTF-8'); ?></a>
- <?php endif ?>
- <nav class="fr">
- <?php $page = (get_query_var('paged')) ? get_query_var('paged') : 1; ?>
- <span class="page-num"><?php echo $page; ?> / <?php echo wp_count_posts('issue')->publish; ?></span>
- <span class="prev"><?php previous_posts_link('Prev', 0) ?></span>|<span class="next"><?php next_posts_link('Next', 0) ?></span>
- </nav>
- </section>
- <?php $count = 1;?>
- <ul class="cont-col clearfix masonry">
- <?php while ( $the_query->have_posts() ) : $the_query->the_post();?>
- <li class="col">
- <?php the_title();?>
- </li>
- <?php if ($count == 1) { ?>
- <li class="col">
- <?php get_template_part('searchform', 'index');?>
- <?php get_template_part('twitter', 'index');?>
- </li>
- <?php }?>
- <?php $count++; ?>
- <?php endwhile; ?>
- </ul>
- <div class="rule"></div>
- <section class="clearfix container issue-nav">
- <?php if (get_option('am_email')): ?>
- <a class="contact-email fl" href="mailto:<?php echo get_option('am_email'); ?>"><?php echo htmlentities ( get_option('am_email') , ENT_QUOTES, 'UTF-8'); ?></a>
- <?php endif ?>
- <nav class="fr">
- <?php $page = (get_query_var('paged')) ? get_query_var('paged') : 1; ?>
- <span class="page-num"><?php echo $page; ?> / <?php echo wp_count_posts('issue')->publish; ?></span>
- <span class="prev"><?php previous_posts_link('Prev', 0) ?></span>|<span class="next"><?php next_posts_link('Next', 0) ?></span>
- </nav>
- </section>
- <?php else: ?>
- <?php endif;?>
- <?php wp_reset_postdata(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement