Preview:
if ( ! function_exists( 'rst_the_posts_navigation' ) ) :
/**
 * Display navigation to next/previous set of posts when applicable.
 *
 * @todo Remove this function when WordPress 4.3 is released.
 */
function rst_the_posts_navigation($query) {
	// Don't print empty markup if there's only one page.
	if ( $query->max_num_pages < 2 ) {
		return;
	}
	$big = 999999999;
	$my_page = max( get_query_var('paged'), get_query_var('page') );
	$paginate_links = paginate_links( array(
		'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
		'format' => '?paged=%#%',
		'current' => max( 1, $my_page ),
		'total' => $query->max_num_pages,
		'prev_text'    => '<svg width="6" height="11" viewBox="0 0 6 11" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M5.64844 5.10156C5.85938 5.33594 5.85938 5.6875 5.64844 5.89844L1.14844 10.3984C0.914062 10.6328 0.5625 10.6328 0.351562 10.3984C0.117188 10.1875 0.117188 9.83594 0.351562 9.625L4.45312 5.52344L0.351562 1.39844C0.117188 1.1875 0.117188 0.835938 0.351562 0.625C0.5625 0.390625 0.914062 0.390625 1.125 0.625L5.64844 5.10156Z" fill="#0A5660"/>
</svg>

',
		'next_text'    => '<svg width="6" height="11" viewBox="0 0 6 11" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M5.64844 5.10156C5.85938 5.33594 5.85938 5.6875 5.64844 5.89844L1.14844 10.3984C0.914062 10.6328 0.5625 10.6328 0.351562 10.3984C0.117188 10.1875 0.117188 9.83594 0.351562 9.625L4.45312 5.52344L0.351562 1.39844C0.117188 1.1875 0.117188 0.835938 0.351562 0.625C0.5625 0.390625 0.914062 0.390625 1.125 0.625L5.64844 5.10156Z" fill="#0A5660"/>
</svg>

',
		'type'			=> 'array'
	 ));
	
	if( is_array( $paginate_links ) ) {
		$paged = ( $my_page == 0 ) ? 1 : $my_page;
		echo '<div id="tf-pagination">';
			echo '<nav class="wp-pagenavi">';
				
				foreach ( $paginate_links as $page ) {
					echo force_balance_tags($page);
				}
			
			echo '</nav>';
		echo '</div>';
	}
}
endif;
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter