Pagination contents not changing in Front page WordPress
This question has asked many time before and none has answers my question. I went through most of the answers before post this.
I have a pagination query in home page. Pagination is showing and I can going through the pages. But same posts are displaying for every paginate link.
This is my code so far. Can anybody elaborate the wrong here?
?php
$paged = ( get_query_var('page') ) ? get_query_var('page') : 1;
$args = array(
'post_type'='post',
'posts_per_page'=10,
'orderby'='date',
'order'='DESC',
'offset'=3,
'paged'=$paged
);
$blogs = new WP_Query($args);
if($blogs-have_posts()):
while($blogs-have_posts()): $blogs-the_post();
?
div class=col-md-6
div class=single-post
div class=thumb
a href=?php the_permalink(); ?
img src=?php the_post_thumbnail_url('blog-thumbnail'); ? alt=?php the_title(); ? class=img-fluid /
/a
/div
div class=content
div class=category
?php
$categories = get_the_category();
foreach ($categories as $key = $category) {
echo 'a href=' . get_category_link($category-term_id). ''. $category-name. '/a';
}
?
/div
h3a href=?php the_permalink(); ??php the_title(); ?/a/h3
div class=metadata
span class=date?php echo get_the_date(); ?/span
span class=author?php echo get_the_author(); ?/span
/div
div class=excerpt
?php the_excerpt(); ?
/div
/div
/div
/div
?php
endwhile;
echo 'div class=paginate-wrap'. paginate_links() . '/div';
endif;
wp_reset_query();
?
Thanks in advance
Topic paginate-links loop php pagination Wordpress
Category Web