I finally made it work. Leaving the answer here in case someone else have the same problem.
<div id="content">
<?php
global $paged;
global $new_query;
$paged = get_query_var('page');
query_posts( array( 'cat' => 251, 'paged' => $paged ) );
$new_query = new WP_Query();
$new_query->query('cat=251&posts_per_page=3&paged='.$paged);
?>
<?php while ($new_query->have_posts()) : $new_query->the_post(); ?>
<?php the_title(); ?>
<?php endwhile; ?>
<div id="pagination">
<?php next_posts_link('« Older Entries', $new_query->max_num_pages) ?>
<?php previous_posts_link('Newer Entries »') ?>
</div>
</div><!-- #content -->
Related Posts:
- Find out total number of pages in global query on archive page?
- Multiple WP_Query loops with Pagination
- WordPress Pagination Not Working – Always Showing First Pages Content
- get_query_var function not working at all
- get_query_var( ‘paged’ ) not working outside of homepage
- Pagination returns 404 after page 20
- paginate_links() adds empty href to first page and previous link
- Pagination with WP_Query is buggy – working for some pages, but not the others
- Get the number of posts from the current page results
- WP_Query and Pagination on a Static front page
- Pagination custom query
- Pagination/infinite scroll with WP_Query and multiple loops
- WP_query and pagination?
- pagenavi with merged wp_query [duplicate]
- Add and in the header while looping over custom query in page template
- Pagination not working on static page
- ‘paged’ in wp_query doesn’t work
- Display different number of posts from one category on the different pages
- Pagination not working Search posts
- WP Query with offset breaks wp_pagenavi or any pagination
- 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]
- Merged two WP_Queries, posts per page and pagination not working
- Pagination 404 errors for author posts query on author.php
- WordPress pagination link always leads to home page
- Pagination problem after WP_Query with tag filtering
- Pagination stops at page 6
- Paginated HTML Sitemap
- 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
- Pagination of a WP_Query Loop in a child-page page template
- WP Pagination on Posts Search Results Page resulting from AJAX WP Query
- Five posts from a category in footer
- paging in WP_Query on static page
- wp_query ‘s’, search filter with pagination is not working
- pagination with numbers for WP_User_Query
- Cutom wp_query for geolocation search, pagination not working
- Pagination inside of a edit page
- Avoid repeated post on page 2 when excluding one on page 1
- WP Query to have sticky posts first, with pagination and having a joint ‘posts per page’ arg with main loop
- Pagination on static Posts page
- How do I get my custom query to work with search results after the first page?
- How to cache wp_query with pagination using transients?
- Removing duplicate values between two wordpress queries
- Stomping WP_Query in author archive to facilitate pagination with custom queries
- Pagination on template page for custom query redirecting to index.php
- Yoast primary category query modification
- Pagination in html table is not working
- Paging + WP Query
- WP_Query custom order and pagination
- Unable to paginate a custom page query
- Query Not working as expected
- WP_query paged pagination with excluded category still counts it
- max_num_pages says 4, yet I am only able to navigate to the third page
- Custom Homepage Pagination using WP_Query
- Paginate pages with dynamic query
- filter posts by meta key with pagination
- Determining what post is displayed out of total posts found
- Trouble Making WP_Query paged
- Ajax (jquery) wp_query pagination returns -1
- Function the_posts_pagination() not compatible with WP_Query arguments
- paginate_links appearing on page but it doesn’t actually paginate – pagination on a static page with a dynamic `post_type` argument on a static page
- Pagination of custom page with custom fields query
- pre_get_posts pagination not working
- Pagination not working on archive.php template?
- WordPress Sub Category Archive, Show Extra Empty Page Number in Pagination
- Pagination unique to a widget
- Pagination inside the blog page not working
- Why pagination is not working with tax_query param?
- paginate_links method doesn’t show second page of my custom wp_query
- Wp_Query Post per page not working?
- Pagination Shows Up But Won’t Work on Custom Gallery Page
- Custom Query Pagination not working on static front page
- WordPress search page pagination displaying but not functional
- Paginated Post List on Front Page
- Combine WP_Query with array of custom data to single loop without breaking the pagination
- Pagination returns 404 after page 20
- WP_Query with Pagination and orderby meta_value_num showing duplicates
- Archive – Show Page Month Headers
- Query post Pagination Problem
- Pagination for custom query throws 404 errors on last pages [duplicate]
- Horizontally paginate through sets of blog posts?
- Pagination error WordPress multiple loop
- Comments orderby comment date not working
- Switched from query_posts to wp_query, pagination no longer working
- Pagination With Custom WP Query not functioning
- Ordering Custom WP_Query loop by meta key value with pagination
- Query specific number of posts for each post type in specific order
- Custom query (author is post_author or meta co_author) with Pagenavi pagination
- Pagination in custom query not working [duplicate]
- paginate_links() on page (shortcode output)
- WordPress Post Looping? [duplicate]
- Pagination showing same posts despite changing page
- error with $query->have_posts()
- Pagination on custom post type not working
- Show number of posts AND number on current page (cannot make it work)
- Search results stuck on page 1
- Pagination only showed when no category is set in wp_query
- taxonomy-{term}.php terms pagination returning 404 after a certain page