I'm trying to set up a 'category.php' that just lists the post titles with links (like an archive page). I've tried 2 different ways to do this and each have separate problems:
1) If I use this sort of code:
<?php
$cat = get_the_category();
$cat = $cat[0];
$posts = get_posts("category=" . $cat->cat_ID . "&numberposts=500");
if( $posts ) :
?>
And then if I display my archive list, it will only return lists of the Parent categories. I.e. if I go to a Child category list, instead of just listing the posts in that Child category it returns the entire Parent category list. I don't want that, I just want the Child list.
2) If I use a basic category code:
<?php if ($posts) { ?>
-
<?php foreach ($posts as $post) : start_wp(); ?>
- "><?php the_title(); ?>
Then both Parent and Child-only lists are generated, but my category page is limited to just the last 10 entires. I need the category page to display ALL posts in the category.
I've tried editing both pieces of code, but I don't know enough to get my category page to do what I want. Any suggestions?