Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- Single Next/Last Post nav
- ================================================== -->
- <section class="sect-posts post-nav cf">
- <?php $prevPost = get_previous_post(true);
- if($prevPost) {
- $args = array(
- 'posts_per_page' => 1,
- 'include' => $prevPost->ID
- );
- $prevPost = get_posts($args);
- foreach ($prevPost as $post) {
- setup_postdata($post);
- ?>
- <article class="g-6 cols" style="background-image:url('<?php echo catch_that_image($page->ID, 'fullsize') ?>');">
- <a href="<? the_permalink()?>" style="background-image:url('<?php echo catch_that_image($page->ID, 'fullsize') ?>');">
- <div class="content">
- <!--<small class="meta-date"><?php the_time('F j, Y'); ?></small>-->
- <small class="meta-date">Last Post</small>
- <hr class="sep"/>
- <h3><?php the_title_shorten(45,'...'); ?></h3>
- </div>
- <div class="overlay"></div>
- </a>
- </article>
- <?php
- wp_reset_postdata();
- } //end foreach
- } // end if
- $nextPost = get_next_post(true);
- if($nextPost) {
- $args = array(
- 'posts_per_page' => 1,
- 'include' => $nextPost->ID
- );
- $nextPost = get_posts($args);
- foreach ($nextPost as $post) {
- setup_postdata($post);
- ?>
- <article class="g-6 cols" style="background-image:url('<?php echo catch_that_image() ?>');">
- <a href="<? the_permalink()?>" style="background-image:url('<?php echo catch_that_image() ?>');">
- <div class="content">
- <!--<small class="meta-date"><?php the_time('F j, Y'); ?></small>-->
- <small class="meta-date">Next Post</small>
- <hr class="sep"/>
- <h3><?php the_title_shorten(45,'...'); ?></h3>
- </div>
- <div class="overlay"></div>
- </a>
- </article>
- <?php
- wp_reset_postdata();
- } //end foreach
- } // end if
- ?>
- </section><!-- .navigation -->
- <?php endwhile; // End the loop ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement