onetone_post_nav

The Onetone onetone post nav function.

Description

onetone_post_nav(); 

Usage

  1. if ( !function_exists( 'onetone_post_nav' ) ) { 
  2. require_once '/includes/theme-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = onetone_post_nav(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/includes/theme-functions.php  
  1. function onetone_post_nav() { 
  2. // Don't print empty markup if there's nowhere to navigate. 
  3. $previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true ); 
  4. $next = get_adjacent_post( false, '', false ); 
  5.  
  6. if ( ! $next && ! $previous ) { 
  7. return; 
  8. ?> 
  9. <nav class="post-pagination" role="navigation"> 
  10. <ul class="clearfix"> 
  11. <?php 
  12. previous_post_link( '<li class="pull-left">%link</li>', '%title' ); 
  13. next_post_link( '<li class="pull-right">%link</li>', '%title' ); 
  14. ?> 
  15. </ul> 
  16. </nav>  
  17.  
  18. <!-- .navigation --> 
  19. <?php