Static Frontpage Pagination – Custom loop

Please, update your loop part with following code:

<?php

$page = (get_query_var('page') ? get_query_var('page') : 1);
$args=array('post_type' => 'gadget', 'post_status' => 'publish', 'posts_per_page' => 36, 'page' => $page);

$wp_query = new WP_Query($args);
if( $wp_query->have_posts() ) {

    $i = 0;
    while ($wp_query->have_posts()) : $wp_query->the_post();
    $postidlt = $post->ID;

Reason before using page instead of paged.
page (int) – number of page for a static front page. Show the posts that would normally show up just on page X of a Static Front Page.

Leave a Comment

tech