Can you show us the code you are using to generate this list?
Thread Starter
trivum
(@trivum)
Here’s the code:
<?php wp_get_archives('type=postbypost&limit=10'); ?>
I was actually able to do what I wanted with the post from a category by putting “&order=asc” into the code, but when I do that with the wp_get_archives it doesn’t seem to work. Here’s the code I used that does what I want it to do with the categories.
<?php
$posts = get_posts('numberposts=10&order=asc&category='. $category->term_id);
foreach($posts as $post) :
?>
I’m wondering if I could use the above code but call all the posts and not just the ones from that particular category.
Yes.. just remove the category declaration in the function
Thread Starter
trivum
(@trivum)
Great – that did it. Thanks a lot Dragon.
Final code for anyone else who comes along:
<?php
$posts = get_posts('numberposts=10&order=asc');
foreach($posts as $post) :
?>
I’d like to do this, but in the main content section (i.e. someone clicks on a category and the posts appear with the oldest post on top).
The code currently looks like this:
<?php while (have_posts()) : the_post(); ?>
<div class="post"><h3 id="post-<?php the_ID(); ?>"><a>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
</div>
<?php endwhile; ?>
Thanks!