It is UNTESTED, but I think this will work:
<?php $cat = '';
if (is_category()) $cat = 'cat=' . get_query_var('cat') . '&';
query_posts($cat . 'posts_per_page=' . get_option('posts_per_page')); ?>
It kind of worked, it shows 20 posts per page, but the paging doesn’t work, when I try and view previous entries it gets a 404 error.
I added this to the top of archive.php
<?php $cat = ”;
if (is_category()) $cat = ‘cat=’ . get_query_var(‘cat’) . ‘&’;
query_posts($cat . ‘posts_per_page=20’); ?>
Give this a try:
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$cat = '';
if (is_category()) $cat = 'cat=' . get_query_var('cat') . '&';
query_posts($cat . "posts_per_page=20&paged=$paged")); ?>
That produces a syntax error, i’m not sure where.
I think one too many close parens on the query_posts line:
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$cat = '';
if (is_category()) $cat = 'cat=' . get_query_var('cat') . '&';
query_posts($cat . "posts_per_page=20&paged=$paged"); ?>
Yeah, that worked perfectly! Thank you so much for your help!
Glad it worked. Now, please use the dropdown at top right to mark this topic ‘Resolved’.