I am useing wp- simple page navigation plugin and my code in template for navigation is given below
<?php
$page = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = array( 'post_type' => 'product', 'posts_per_page' => 6, 'product_cat' => '', 'orderby' => 'rand' , 'paged' => $page );
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post(); global $product; ?>
<div class="view view-eighth">
<?php echo get_the_post_thumbnail($loop->post->ID, 'shop_catalog', array(
'style' => 'width: 243px; height: 323px;'
)); ?>
<div class="mask">
<div class="product_name"><?php echo esc_attr($loop->post->post_title ? $loop->post->post_title : $loop->post->ID); ?></div>
<div class="price">
<span><?php echo get_woocommerce_currency_symbol(); ?></span><?php echo get_post_meta( get_the_ID(), '_regular_price', true); //$product->get_price_html(); ?></div>
<div class="add_to_cart_btn">
<a href="<?php echo $product->add_to_cart_url(); ?>">Add to cart</a>
</div>
<div class="details"><a href="<?php echo get_permalink( $loop->post->ID ); ?>">View Details</a></div>
</div>
</div>
<?php endwhile; wp_simple_pagination(); wp_reset_query(); ?>
My pagination showing but when i click on page number its not working
Any idea help greatly appreciated
Thanks
In advance