You aren’t preserving the paged
query var in your query. You can accomplish this by making line 4:
$wp_query = new WP_Query($query . "&paged=" . $original->query_vars['paged']);
UPDATE: After the edit on the OP, the issue was that the paging variable, paged
was in the query being sent to the function. But, there was a typo so that the page variable (which would have been false in this case) was actually being sent to the function.
Therefore, we corrected:
'query' => array(
'post_type' => 'post',
'paged' => get_query_var('page')
),
to
'query' => array(
'post_type' => 'post',
'paged' => get_query_var('paged')
),
Related Posts:
- Multiple WP_Query loops with Pagination
- Pagination returns 404 after page 20
- Pagination with WP_Query is buggy – working for some pages, but not the others
- Get the number of posts from the current page results
- Pagination with 5 posts per page
- Pagination/infinite scroll with WP_Query and multiple loops
- Pagination Not working on Home Page with 2 Query
- Display different number of posts from one category on the different pages
- Pagination not working Search posts
- Transient pagination not working properly
- Injecting content with $wp_query->current_post restarts from zero on paged pages. How to inject content after X posts, regardless of pagination?
- Woocommerce custom loop to show all the products [closed]
- How to bring specific post to front of wordpress loop?
- Pagination stops at page 6
- Paginated HTML Sitemap
- Multiple WP_Query loops with Pagination Not Working
- Posts loop with pagination on a single post page
- Create ONE callback for all page templates, post filter queries + paginated pages, triggering pagination via AJAX
- Pagination is broken and I need help fixing it
- Storing query variable and then using wp_reset_query
- Create A Loop With A Variable Number of Posts For Each Bootstrap Row?
- Five posts from a category in footer
- posts_per_page not working for first page of pagination
- How do I get my custom query to work with search results after the first page?
- Stomping WP_Query in author archive to facilitate pagination with custom queries
- Second loop pagination changes URL, not content
- I am officially missing something about transient posts
- Paginate pages with dynamic query
- Function the_posts_pagination() not compatible with WP_Query arguments
- How can I have sticky posts while ALSO showing posts from a specific category using one WP_Query?
- Pagination inside the blog page not working
- Custom Query Pagination not working on static front page
- Paging works correctly on local version, but not live?
- Problem with custom WP_Query and underlying pagination/posts_per_page
- 2 Loops on one page – pagination of 2nd loop ignore array of excluded posts
- Pagination returns 404 after page 20
- custom query – offset to pagination
- Pagination not working with WP_QUERY
- No content found on page 2 of pagination with 1 post per page
- wp_query pagination links producing 404
- Loop being strainge
- Pagination in custom query not working [duplicate]
- Multiple loops on index page with sticky post and pagination
- Pagination problem with multiple loops on the same page
- WordPress Post Looping? [duplicate]
- Show number of posts AND number on current page (cannot make it work)
- Pagination only showed when no category is set in wp_query
- Find out total number of pages in global query on archive page?
- Resetting post data to previous loop in nested loops
- WordPress Pagination Not Working – Always Showing First Pages Content
- Make loop display posts by alphabetical order
- Group posts by custom field
- get_posts() seemingly ignoring post_type
- How to show the posts of some category first, and then all other
- Pagination problem after WP_Query with tag filtering
- Why does the_content not work like others for a set post id?
- How to limit total number of posts in wp query loop?
- WP Pagination on Posts Search Results Page resulting from AJAX WP Query
- How to vary post loop results layout and resume?
- Get a post from other loop each n-posts in the main loop
- paging in WP_Query on static page
- WordPress Loop and $post
- Excluding pages in WP_query using ACF
- reset to main loop doesnt work
- Some doubts about how the main query and the custom query works in this custom theme?
- Post loop for all taxonomy terms
- Pagination on static Posts page
- Only display post if published in last 24 hours?
- How to remove the most recent post from $the_query
- WP_Query loop else statement not executing
- How to cache wp_query with pagination using transients?
- Check for the main query from the template
- How can I use the WordPress Loop and Pagination in multiple instances but different scenarios throughout my site?
- has_excerpt() not working inside wp_query
- Save (and exclude) posts from loop to use in another loop on page
- Check if a post has term inside loop
- How to Order By Two Custom Fields?
- Display specific page (that is child) content on parent page
- Paging + WP Query
- Compare “Main” post ID to ID inside wp_query loop
- filter posts by meta key with pagination
- Ajax (jquery) wp_query pagination returns -1
- problem with the loop
- Pagination of custom page with custom fields query
- Pagination not working on archive.php template?
- Numbered Pagination Showing The Same Posts After Altering WP_Query
- How to show specify category template for both parent and child category
- Woocommerce featured products query no longer working
- WordPress search page pagination displaying but not functional
- Paginated Post List on Front Page
- modifying the loop multiple times with arguments passed through ajax to wp_query
- WP_Query causing links to not work
- Query post Pagination Problem
- Pagination for custom query throws 404 errors on last pages [duplicate]
- An archive page without post format (just standard post)
- Ordering Custom WP_Query loop by meta key value with pagination
- Pull Instagram images into an existing loop?
- paginate_links() on page (shortcode output)
- Pagination showing same posts despite changing page
- First post outside of loop, homepage only?