wordpress posts pagination code example
Example: add pagination to wordpress
<?php
echo paginate_links( array(
'mid_size' => 3,
'prev_text' => __( '« Prev', 'textdomain' ),
'next_text' => __( 'Next »', 'textdomain' ),
) );
?>