eljayesse
Member
Posted 1 year ago #
Hello there,
is there a way to display an index of all post titles (just the titles) in ascending chronological order (oldest first, newest last) in a separate archive page?
<?php wp_get_archives('type=postbypost'); ?> this code doesn't do the job, displays post titles in descending order :(
Thanks a lot for any good news!
eljayesse
Member
Posted 1 year ago #
Thanks, Samuel!
I've found this thread before and modified the code since it is all post titles I wanted to display sorted by date in ascending order:
<?php wp_get_archives( $args ); ?>
<?php
$args = array(
'type' => 'postbypost',
'orderby' => 'date',
'order' => 'ASC'
); ?>
but I doesn't do it...
eljayesse
Member
Posted 1 year ago #
Resolved! Funnily it is DESC order... bo! Thanks!
<?php query_posts(array('order'=>'DESC','orderby'=>'title','posts_per_page'=>'-1',));
if (have_posts()) : while (have_posts()) : the_post(); ?>
" title="<?php the_title(); ?>">
<?php the_title(); ?>
<?php endwhile; ?>
<?php endif; ?>