On the first page of a specific category, I want WordPress to show 4 posts per page. On the following pages, however, I'd like to have 6 posts per page. I tried using a conditional query (see below), but this completely screwed up the number of posts per page...
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
if ($paged == 1) {
query_posts("posts_per_page=4&category_name=Neuigkeiten&paged=$paged");
}
elseif ($paged > 1) {
query_posts("posts_per_page=6&category_name=Neuigkeiten&paged=$paged");
}
This leads to 3 posts being displayed in a wrong order. There's probably a stupid mistake in there, but I can't figure it out. Echoing the $paged
variable works just fine.