Display x ammount of posts
-
I’m sorry for #2 support-request in a really short amount of time. It’s almost time to start paying for the awesome support I’m getting.
Anyway, this time I want to decide how many posts I display on the page (using that category-x.php).
What I’ve done now is:
<?php $myposts = get_posts('numberposts=1&category=3'); foreach($myposts as $post) : ?> <div class="post" id="post-<?php the_ID(); ?>"> <h3 class="storytitle"><a href="<?php the_permalink() ?>" ><?php the_title(); ?></a></h3> <div class="storycontent"> <?php the_content(__('(more...)')); ?> </div> </div> <?php endforeach; ?>
and it works the way I like it to, except the titles and permalinks who all link to the latest post and display the latest posts title. Is there any else better, more optimized way to do this or am I just missing some simple line of code?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Display x ammount of posts’ is closed to new replies.