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?
PER_PAGE_DEFAULT? Try replacing it with a static value for testing, say 3 and then see if the pagination works. – Rutwick Gangurde Jun 23 '12 at 5:10