srikat

Untitled

Jan 8th, 2015
304
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.83 KB | None | 0 0
  1. add_action( 'genesis_loop', 'sk_fixed_cpt_nav' );
  2. function sk_fixed_cpt_nav() {
  3.     global $post;
  4.    
  5.     $prev_post = get_adjacent_post( true, '', true );
  6.    
  7.     $next_post = get_adjacent_post( true, '', false ); ?>
  8.    
  9.     <div class="btn-wrap">
  10.         <a class="prevBtn" href="<?php echo $prev_post->guid; ?>">
  11.             <span class="arrow"></span>
  12.             <span class="button work">
  13.                 <span class="arrow-inner"></span>
  14.                 <span class="label">
  15.                     <span class="inner-text"><?php echo $prev_post->post_title; ?></span>
  16.                 </span>
  17.             </span>
  18.         </a>
  19.         <a class="nextBtn" href="<?php echo $next_post->guid; ?>">
  20.             <span class="arrow"></span>
  21.             <span class="button work">
  22.                 <span class="arrow-inner"></span>
  23.                 <span class="label">
  24.                     <span class="inner-text"><?php echo $next_post->post_title; ?></span>
  25.                 </span>
  26.             </span>
  27.         </a>
  28.     </div>
  29. <?php }
Advertisement
Add Comment
Please, Sign In to add comment