Pagination not working – FrontPage

I use this on archive pages. If you are trying to use it elsewhere then that might be a cause of the issue.

if ( ! function_exists( '_s_pagination_links' ) ) :
/**
 * Numbered pagination
 */
function _s_pagination_links() {
    global $wp_query;

    $total_pages = $wp_query->max_num_pages;

    if ($total_pages > 1){
        $current_page = max(1, get_query_var('paged'));

        echo paginate_links(array(
            'base' => get_pagenum_link(1) . '%_%',
            'format' => 'page/%#%',
            'type'      => 'list',
            'current' => $current_page,
            'total' => $total_pages,
        ));
    }
}
endif;