I want to list all my posts (headline only) in chron order with the oldest first and a little header that identifies what number post it is…
make a tag, call it “apples”, then make a custom tag pag called “tag-apples.php” ..
– does that mean you want only all posts with the tag ‘apples’ in that list?
get it to go in reverse order
http://codex.wordpress.org/Function_Reference/query_posts#Usage_Note
– ideas to numbering:
possibly with the use of a counter variable and for the output a function like this:
http://www.php.net/manual/en/function.number-format.php#89655
you could use the http://pastebin.com/ to share whatever code you have so far…
Bam, thanks a lot. I solved the number problem pretty simply… just used an ordered list!
But man, this php is killing me. It’s chicken or the egg on understanding how it works. That page you linked too shows all this “query_posts” stuff, but my code is much simpler, doesn’t have any of that. This is the only relevant part:
<ol><?php while (have_posts()) : the_post(); ?>
<li><h4><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h4></li>
<?php endwhile; ?>
</ol>
Works great except for the order which I want to reverse….
following this link http://codex.wordpress.org/Function_Reference/query_posts#Usage_Note, insert the ‘query_posts’ stuff before the loop:
<ol><?php global $query_string; query_posts($query_string . '&order=ASC'); while (have_posts()) : the_post(); ?>
<li><h4><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h4></li>
<?php endwhile; ?>
</ol>
it kind of says: use the existing query, but add the ‘order’ parameter and set it to ‘ASC’