otw_pagination

The Carbon Light - Business responsive otw pagination function.

Description

otw_pagination(); 

Usage

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

Defined (1)

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

/functions.php  
  1. function otw_pagination() { 
  2. if (function_exists('otw_pagination')) { 
  3. global $wp_query; 
  4. $big = 999999999; 
  5. echo paginate_links(array( 
  6. 'type' => 'list',  
  7. 'current' => 0,  
  8. 'base' => str_replace($big, '%#%', get_pagenum_link($big)),  
  9. 'format' => '?paged=%#%',  
  10. 'current' => max(1, get_query_var('paged')),  
  11. 'total' => $wp_query->max_num_pages 
  12. )); 
  13. } else { 
  14. wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'otw-carbon-light' ), 'after' => '</div>' ) );