web_dor_post_nav

The Business Responsive web dor post nav function.

Description

web_dor_post_nav(); 

Usage

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

Defined (1)

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

/functions.php  
  1. function web_dor_post_nav() { 
  2. global $post; 
  3. $previous = ( is_attachment() ) ? get_post( $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="page-navigation"> 
  10. <?php previous_post_link( '%link', '<span class="meta-nav">←</span> %title', 'Previous post link' ); ?> 
  11. <?php next_post_link( '%link', '%title <span class="meta-nav">→</span>', 'Next post link' ); ?> 
  12. </nav> 
  13. <?php