public_html/wp-content/themes/LocalTwo/inc/template-tags.php
/**
	 * Display navigation to next/previous set of posts when applicable.
	 */
Display navigation to next/previous set of posts when applicable.
Display navigation to next / previous set of posts when applicable .
function divertheme_paging_nav() {
		global $wp_query, $wp_rewrite;
		if ( $wp_query->max_num_pages < 2 ) {
			return;
		}
		$paged        = get_query_var( 'paged' ) ? intval( get_query_var( 'paged' ) ) : 1;
		$pagenum_link = html_entity_decode( get_pagenum_link() );
		$query_args   = array();
		$url_parts    = explode( '?', $pagenum_link );
		if ( isset( $url_parts[1] ) ) {
			wp_parse_str( $url_parts[1], $query_args );
		}
		$pagenum_link = esc_url( remove_query_arg( array_keys( $query_args ), $pagenum_link ) );
		$pagenum_link = trailingslashit( $pagenum_link ) . '%_%';
		$format = $wp_rewrite->using_index_permalinks() && ! strpos( $pagenum_link, 'index.php' ) ? 'index.php/' : '';
		$format .= $wp_rewrite->using_permalinks() ? user_trailingslashit( $wp_rewrite->pagination_base . '/%#%', 'paged' ) : '?paged=%#%';
		$links = paginate_links( array(
			'base'      => $pagenum_link,
			'format'    => $format,
			'total'     => $wp_query->max_num_pages,
			'current'   => $paged,
			'mid_size'  => 1,
			'add_args'  => array_map( 'urlencode', $query_args ),
			'prev_text' => __( '&larr; Previous', 'twentyfourteen' ),
			'next_text' => __( 'Next &rarr;', 'twentyfourteen' ),
		) );
		if ( $links ) :
			?>
			<div class="pagination loop-pagination">
				<?php echo $links; ?>
			</div><!-- .pagination -->
			<?php
		endif;
	}
function divertheme_paging_nav ( ) { global $ wp_query , $ wp_rewrite ; if ( $ wp_query -> max_num_pages < 2 ) { return ; } $ paged = get_query_var ( 'paged' ) ? intval ( get_query_var ( 'paged' ) ) : 1 ; $ pagenum_link = html_entity_decode ( get_pagenum_link ( ) ) ; $ query_args = array ( ) ; $ url_parts = explode ( '?' , $ pagenum_link ) ; if ( isset ( $ url_parts [ 1 ] ) ) { wp_parse_str ( $ url_parts [ 1 ] , $ query_args ) ; } $ pagenum_link = esc_url ( remove_query_arg ( array_keys ( $ query_args ) , $ pagenum_link ) ) ; $ pagenum_link = trailingslashit ( $ pagenum_link ) . '%_%' ; $ format = $ wp_rewrite -> using_index_permalinks ( ) && ! strpos ( $ pagenum_link , 'index.php' ) ? 'index.php/' : '' ; $ format .= $ wp_rewrite -> using_permalinks ( ) ? user_trailingslashit ( $ wp_rewrite -> pagination_base . '/%#%' , 'paged' ) : '?paged=%#%' ; $ links = paginate_links ( array ( 'base' => $ pagenum_link , 'format' => $ format , 'total' => $ wp_query -> max_num_pages , 'current' => $ paged , 'mid_size' => 1 , 'add_args' => array_map ( 'urlencode' , $ query_args ) , 'prev_text' => __ ( '&larr; Previous' , 'twentyfourteen' ) , 'next_text' => __ ( 'Next &rarr;' , 'twentyfourteen' ) , ) ) ; if ( $ links ) : ?> <div class="pagination loop-pagination">
				 <?php echo $ links ; ?> </div><!-- .pagination -->
			 <?php endif ; }
Display navigation to next/previous set of posts when applicable.
Display navigation to next / previous set of posts when applicable .
// Don't print empty markup if there's only one page. // Set up paginated links.