From 00c9709fd9763542e848f6278db8ba26af5c9886 Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 15 Oct 2018 23:46:42 +0200 Subject: Initial commit. --- inc/pagination.php | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 inc/pagination.php (limited to 'inc/pagination.php') diff --git a/inc/pagination.php b/inc/pagination.php new file mode 100644 index 0000000..9a6ff79 --- /dev/null +++ b/inc/pagination.php @@ -0,0 +1,56 @@ +max_num_pages <= 1) return; + + $args = wp_parse_args( $args, array( + 'mid_size' => 2, + 'prev_next' => true, + 'prev_text' => __('«', 'understrap'), + 'next_text' => __('»', 'understrap'), + 'screen_reader_text' => __('Posts navigation', 'understrap'), + 'type' => 'array', + 'current' => max( 1, get_query_var('paged') ), + ) ); + + $links = paginate_links($args); + + ?> + + + + -- cgit v1.2.3