element. Default 'pagination'. */ function understrap_pagination( $args = array(), $class = 'pagination' ) { if ( $GLOBALS['wp_query']->max_num_pages <= 1 ) { return; } $args = wp_parse_args( $args, array( 'mid_size' => 2, 'prev_next' => true, 'prev_text' => __( '«', 'understrap' ), 'next_text' => __( '»', 'understrap' ), 'type' => 'array', 'current' => max( 1, get_query_var( 'paged' ) ), 'screen_reader_text' => __( 'Posts navigation', 'understrap' ), ) ); $links = paginate_links( $args ); ?>