March 6, 08
Wordpress users: There is a setting in Wordpress that allows you to set the number of posts shown at one time. This is a very good feature. However, if you want to put a listing on the archive page you will notice it pulls from the same setting. I like to have only the topic links of a category on the archive page. This leads to a problem. I want to only list two or three topics on the main page, yet I want to have a larger listing on the archives page. A simple little snippet will fix that for you. On your archive template page, simply add this little bit of code near the top:
You can replace the number 20 with any number of listings you want.
<?php if(is_archive) query_posts($query_string . “&posts_per_page=20″); ?>

Posted in
RSS 2.0 feed




