More than five posts in subcategory list
-
I’m trying to list subcategories and their posts within of a parent category. All is working well, but I can’t seem to get the list to show more than five posts. Here is my code:
<?php $categories = get_categories('child_of=3'); ?> <?php foreach ($categories as $category) { ?> <div class="entry-feed"> <div class="entry"> <?php echo '<h3>'.$category->name.'</h3>'; ?> <?php $args=array('cat='.$category->term_id);?> <?php foreach (get_posts($args) as $post) { setup_postdata( $post ); echo '<h3><a href="'.get_permalink($post->ID).'">'.get_the_title().'</a></h3>'; }//end innner for each ?></div><!--end entry feed--> <div class="clearfix"></div> </div><!--end entry--> <?php }//end outer foreach ?>
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘More than five posts in subcategory list’ is closed to new replies.