Skip to content

Commit 385b51a

Browse files
committed
Fix #12
Fix pagination issue on blog page
1 parent 2cea073 commit 385b51a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

blog.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,15 @@
2727
$post_type = 'post';
2828
$orderby = 'date';
2929
$order = 'DESC';
30+
$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
3031

3132
$query = new WP_Query(
3233
array(
3334
'post_type' => $post_type,
3435
'posts_per_page' => $posts_per_page,
3536
'orderby' => $orderby,
3637
'order' => $order,
38+
'paged' => $paged,
3739
)
3840
);
3941

@@ -83,7 +85,6 @@
8385
array(
8486
'base' => get_pagenum_link( 1 ) . '%_%',
8587
'format' => $format,
86-
'current' => $current_page,
8788
'total' => $total,
8889
'mid_size' => 4,
8990
'type' => 'list',

0 commit comments

Comments
 (0)