responsive_mobile_post_nav

Display navigation to next/previous post when applicable.

Description

responsive_mobile_post_nav(); 

Usage

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

Defined (1)

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

/includes/functions-template-tags.php  
  1. function responsive_mobile_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="navigation post-navigation" role="navigation"> 
  10. <h1 class="screen-reader-text"><?php _e( 'Post navigation', 'responsive-mobile' ); ?></h1> 
  11.  
  12. <div class="nav-links"> 
  13.  
  14. <div class="nav-previous"><?php previous_post_link( '%link', _x( '<span class="meta-nav">←</span> %title', 'Previous post link', 'responsive-mobile' ) ); ?></div> 
  15. <div class="nav-next"><?php next_post_link( '%link', _x( '%title <span class="meta-nav">→</span>', 'Next post link', 'responsive-mobile' ) ); ?></div> 
  16.  
  17. </div> 
  18. <!-- .nav-links --> 
  19. </nav><!-- .navigation --> 
  20. <?php