The pagination works only, if the paged attribute in the the global $wp_query variable is set. You could store your query manually in this global or just use query_posts() instead of new WP_Query().
<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$the_query = query_posts(
array(
'post_type'=>'article',
'posts_per_page'=>2,
'orderby'=>'date',
'paged'=>$paged
)
);
// ...
?>
The function query_posts() will unset an existing $wp_query global, runs a new WP_Query() and stores the result again in the global $wp_query variable.
Related Posts:
- Custom pagination for custom post types (by names)
- Pagination throws 404 error on custom taxonomy archive pages
- Custom Post Type Archive Page: Set Posts Per Page, Paginate
- Pre get posts for single post
- Archive page…limiting posts per page
- Pagination not working with custom category template
- Custom Post Type pagination – normal solutions aren’t helping
- Custom Post Type Archives by Date (stored as meta value) WP3.1
- Pagination Doesn’t Work
- Numeric pagination custom post type
- Posts in Multiple Columns and Rows with one single loop
- Pagination gives 404 error
- Paginate Custom Post Type Page
- Creating a simple pagination for custom post type templates
- Pagination not working
- Pagination Custom post type
- Pagination Issue: Custom Post Type In Index
- Order WordPress Custom Taxonomy Pages & Pagination Not Working
- Pagination problem
- Custom post type archive not regarding ‘posts_per_page’ => -1
- Unable to get paginate_links working with a custom query [duplicate]
- Setting posts per page in query_posts
- Custom post type, permalinks & pagination, going wrong
- Repeating posts when paginating random posts
- Pagination for custom php code
- How i can add ‘N’ page of ‘N’ pages under posts loop?
- Pagination on a custom post type loop
- Page vs Custom Post Types Differences/Issues
- Pagination for Custom Taxonomy Page [duplicate]
- Pagination on with query_posts in custom post type template
- Paging doesn’t work?
- Custom taxonomy rewrite give pagination 404
- Next and Previous Posts of Same Parent
- Custom template Page 2 not working
- How to handle paged param in post and custom-post-type?
- custom post type pagination error 404
- Next Post links not working in custom post type shortcode
- Custom Post Types strange pagination problem
- Pagination with custom query, custom search form, single and pages, ajax and no plugins
- pagination not working for category.php (custom post types in categories)
- Cant get paginations on single.php to work with my custom post types
- Pagination custom post type not working with rewrite slug
- Pagination Not Working for Custom Taxonomy with Custom Query – 404 Error
- Can’t use pagination with custom taxonomy
- Trouble with pagination
- previous_post_link in same taxonomy in custom post type
- How to do admin CRUD & Pagination
- Custom ordering of CPT items not matching with the ordering of its pagination
- How to list custom post types on a custom post type page?
- Custom post pagination trouble
- Pagination on a page
- Custom Post Type Pagination on Single.php?
- Single parent post lists child posts with pagination
- Using custom post type as front home page pagination not working
- Custom post type pagination error
- Previous / Next Links For Custom Post Type Sorted By Meta_Value
- Problem with custom loop navigation inside the blog page
- pagination for custom post type archive page
- custom taxonomy pagination 404 error
- Custom archive page for custom taxonomy and pagination issue
- Pagination Not Working When Used With WP_Query() `offset` Property
- pagination problem listing custom post types of taxonomy in wordpress
- Permalink for custom post type pages not working
- How to display custom post type pagination buttons when processing AJAX request
- Make pagination work as a carousel (custom query)
- Why is my loop not populating the page with my custom taxonomy terms from my custom post type?
- Pagination for custom query returns 404
- Custom Post Type Pagination – not displaying posts
- Pagination with a custom post type
- I want to create pagination for my custom post type archive that i am displaying with loop
- next_posts_link() always generates second page link on custom post type
- Pagination URL in Custom Content Type
- yet another: custom post type with pagination not working in WordPress
- Custom post type with Filter and Page Nav
- Pagination fault in custom post type archive page [duplicate]
- Pagination custom post types outside loop
- Paginating custom query on category template
- Custom post type blog pagination conflict
- Custom post type pagination, single page issue
- Pagination for a Custom Taxonomy
- Pagination always adding “Next” link when results come from Custom Post Type WP_query
- Pagination for event query
- Pagination not working with custom loop
- Pagination not working with custom loop
- Archive Page Pagination not working
- Classic Custom Post Types and WP-PageNavi
- List of filtered Events is breaking paging?
- Pagination not working on homepage
- How do I paginate a custom post type listing on a custom template page?
- Archive page – problem with pagination
- WordPress getting problem with pagination [duplicate]
- Pagination not working
- What Is My Fault With This WP_QUERY ? [ Pagination Problem ]
- Pagination not working only on Archive-Name.php using new WP_Query
- Pagination not working on custom post type archive
- Archive pagination – second page shows exactly the same posts
- Two pagination in one page without AJAX
- “Page not found” while on page 2 from pagination menu
- Issues with Ajax Pagination and Filtering
- Custom post type pagination not working in index.php file