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.
Related Posts:
- How to get all author posts outside of author templates
- Need help with pagination
- How does printf( __( ) ); work?
- Return HTML Template Page with PHP Function
- Why do templates contain so many PHP tag pairs?
- Getting paginate_links() ‘end_size’ to display none
- What exactly does “Posts page” do in WordPress?
- Check if a menu is empty?
- I can’t fetch query parameters ($_GET parameters) with get_query_var
- How to have a custom display for both woocommerce archive and product-category pages? [closed]
- On this day PHP code
- How to loop over custom fields in a page template?
- WooCommerce – Customer Order History Pagination
- WordPress theme & site not loading after moving files
- Pagenavi pagination via wp-query in functions.php showing same content for each page
- How to check if comments are paginated?
- Use Timber/Twig to pull an image by image ID [closed]
- Add “last” and “first” to WordPress Comment Pagination Links
- Blank space at beginning of tag?
- WordPress get pagination on wpdb get_results
- Link to file in plugin directory from wordpress template?
- Password protecting content in custom template
- Sorting Posts | Alphabetical Order
- Getting rid of role=”navigation” in the Home Page Pagination
- How to get the Page Number of the Current Page in Single Post Pagination
- An unwanted inline style is added to my body tag
- Render ninja form inside markup
- How can I properly control the numbers and dots that appear in pagination?
- Increase returned number/pages on pagination
- Adding nofollow to a PHP generated Nav
- Using loop pagination on single.php
- Mass update excerpt
- How can I get a single php file that is the equivalent of an existing WordPress page?
- Custom search results page not working with empty search
- I have a problem in the order of enqueues while enqueuing stylesheets and scripts for a specific page in my function.php
- How to show all pages in blog navigation?
- get_terms pagination
- Change title only in dynamic page
- Pagination in plugin’s backend
- How can I edit the content in index.php? [duplicate]
- PHP code to use on next & previouspage links
- Can’t print Yoast meta description into page template (syntax error, unexpected ‘.’) [closed]
- PHP include is only working in certain places in my custom WP theme
- Use WordPress function in php file
- Add filter multiple times using only one master function
- How to create pagination for users list using custom array?
- Pagination on Custom Post
- Function Reference Documenting Template Tags for use in Custom Theme Templates?
- Removing WordPress Footer -without access to PHP code?
- How to set a template with wp_insert_post
- Why is a wp function used in current PHP namespace’s callback not resolved to global scope?
- Create page template via functions.php?
- What’s a good way to allow overwriting files within a child theme if I want the same folder structure?
- how to display this functions?
- is_page_template showing partial results
- Adding regular php file to site
- ACF Repeater Pagination stopped working since upgrade to php7.2
- Post repeated when opening in overlay, how do I solve this? [closed]
- Creating custom page template from existing PHP site
- Custom pagination (Previous / Next)
- WordPress pagination not working in search result page
- Remove Post if Advanced Custom Field is checked to fix paging
- How to add PHP pagination to wordpress
- pass html code to worpdress
- Pagination stays on same page for post category
- Getting a WordPress tag to print inside of a traditional php echo
- Pagination in single.php
- Help to modify wp_link_pages()
- Prevent header and footer from loading on specific pages with template or plugin
- Pagination contents not changing in Front page WordPress
- Load more posts using AJAX based on posts inside WP_Query
- Display metabox galleries on specific page template in admin editor
- Display WordPress archive template page in 3 columns and not 1 column [closed]
- Run do_shortcode on php template using JS function
- How to hardcode header and footer in WP?
- static page pagination not working
- Polylang and template files
- AJAX numerical pagination problem in TwentyFifteen-child theme
- Pagination – Previous link is not show and Next link sticks at page 2
- If is_page elseif is_page not working like I want it to
- Change WooCommerce template for PDF – access to custom field
- How can I get my pagination loop to display the correct number of total pages?
- missing admin bar and widget in a template
- How to include a function in a template with template tag
- Add a leading zero to pagination
- Get current_post in reverse order with pagination
- My own theme’s custom widget areas are not working
- How do I modify the Previous and Next Page posts on blog pages to include “previous” and “next” before the links?
- rewrite_rule – working fine but broken for pagination
- How to call a certain object/menubar in a PHP file
- How can i list all user registered on my website and have pagination [duplicate]
- why is markup routinely placed in functions in wordpress?
- Pagination not displaying
- Pagination in category.php not functioning
- How to add pagination for wordpress home page
- Pagination 404 on my index.php
- paginate_links() returns NULL instead of the pagination links, but pagination is actually happening
- What does this if-statement do?: if($pages=’ ‘) {}
- Blog Posts not sorted and pagination not adjusted after filtering some category
- /page/2/ redirect to 404