<?php
	/**
	 * Pagination for blog.
	 */

	global $wp_query;
	$prime_business_big = 999999999; // need an unlikely integer

	if ( $wp_query->max_num_pages <= 1 ) {
	    return;
	}
?>
	<div class="navigation post-pagination" role="navigation">

	    <div class="nav-links">
	        <?php
				the_posts_pagination( array(
					'base' => str_replace( $prime_business_big, '%#%', esc_url(get_pagenum_link( $prime_business_big ) ) ),
					'format' => '?paged=%#%',
					'add_args' => false,
					'current' => max( 1, get_query_var( 'paged' ) ),
					'total' => $wp_query->max_num_pages,
					'mid_size' => 4,
					'prev_text' => esc_html__( 'Prev', 'prime-business' ),
					'next_text' => esc_html__( 'Next', 'prime-business' ),
					'before_page_number' => '<span class="meta-nav screen-reader-text">' . esc_html__( 'Page', 'prime-business' ) . ' </span>',
				) );
	        ?>
	    </div>
	</div>
