Try $paged it is a WordPress global.
$args = array(
'post_type' => array ('post','customposttype','tag','taxonomy','page'),
'posts_per_page' => 16,
'paged' => $paged,
'orderby' => 'date',
'order' => 'DESC'
);
WP_Query($args);
HTH
David
Thread Starter
isay
(@isay)
Still the “ERROR 404 – NOT FOUND”…
When reading about the WP_Query it’s a bit cryptic:
Pagination Note: You should set get_query_var( ‘page’ ); if you want your query to work with pagination. Since WordPress 3.0.2, you do get_query_var( ‘page’ ) instead of get_query_var( ‘paged’ ). The pagination parameter ‘paged’ for WP_Query() remains the same.
I’ve tried a few options but still get the 404…
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = array(
'post_type' => array ('post','customposttype','tag','taxonomy','page'),
'posts_per_page' => 16,
'paged' => $paged,
'orderby' => 'date',
'order' => 'DESC'
);
WP_Query($args);
Thread Starter
isay
(@isay)
Still 404…
Sorry, something fell off when I pasted into the post…
my archives.php code says $all_posts_in_cat = new WP_Query($args); instead of just WP_Query($args);
$all_posts_in_cat = new WP_Query($args); is fine.
Can you paste your archives.php up to pastebin and add the link in a reply here.
David
Thread Starter
isay
(@isay)
Ok, I posted my archives.php and pagination.php into pastebin….
archive.php: http://pastebin.com/9gTbXBTH
pagination.php: http://pastebin.com/fNpdguPe
Thanks really much guys if you would take a look at this!
I really appreciate it…
//Mike
Thread Starter
isay
(@isay)
Any hints on this one??
If I am on the archives page and click on the link to page 2 it seems as though that the query information is lost and I am presented the general posts.php template…
In other words, WP seem to forget that I was in the archive view…
Any help is appreciated!
//Mike