$cat = ‘1’ should identify that you want to use the category with ID=1
http://photomatt.net/archives/2004/05/19/asides/
the above link also shows an example of how to use in_category().
Hope that helps.
Thread Starter
Anonymous
ok it works with the in_category function, thanks
i’ve setup 2 loops: the first is the main loop with full text posts, and the second shows only the titles of the posts of one certain category
problems:
1. can i change the limit of posts per page in both loops
2. when in permalink view for the first loop, is there a way to make the second loop still show all the titles of the posts in that category?
(hi, i’m mister anonymous, i just made myself a user)
how should multiple loops be used? at the moment i’m just repeating this a couple of times:
<?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
<?php if (in_category(2) && !$single) { ?>
..........
<?php } else { } ?>
<?php endforeach; else: ?>
<?php _e('Sorry, no posts matched your criteria.'); ?>
<?php endif; ?>
But now i found something about the get_posts() functions. What is this, how does it work, is there any documentation about it?
Sorry for the not so obvious questions, but i hope someone knows how it works…
Problem solved! See here for limiting posts, filtering categories on multiple WP loops:
http://ww.wp.xz.cn/support/index.php?action=vthread&forum=10&topic=6012&page=0