Custom Post Type Pagination Doesn’t Work in WordPress 3.4

I have a problem when using WordPress 3.4. My “Products” custom post type pagination doesn’t work. Here is the code I use

$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$loop = new WP_Query( array(
'post_type' => 'products',
'posts_per_page' => PER_PAGE_DEFAULT,
'paged'=>$paged
) );

That code works well in previous WP version (WordPress 3.3.2) but not in current version i.e. 3.4. What am I doing wrong?

Related posts

Leave a Reply

1 comment