Support » Fixing WordPress » Paginate archive list

  • I’m showing a list of post titles, arranged a-z, using this code:

    <?php wp_get_archives('type=alpha'); ?>

    How do I paginate it?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Here is an article that shows how to paginate an array using the WP function paginate_links():


    However, unfortunately that’s too complex for me to understand.

    But, having studied things more, I’ve since found a way which works and I understand.

    In case it might help someone…

    Instead of type+alpha, I used:

    <?php $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts("orderby=title&order=asc&showposts=10&paged=$page"); ?>
    <?php while ( have_posts() ) : the_post() ?>
    <p><a href="<?php the_permalink(); ?>" title="read this entry"><?php the_title(); ?></a></p>
    <?php endwhile ?>

    Glad you found a solution! Please use the dropdown on the right to mark this topic ‘Resolved’ so that anyone else with this question can see that there is a solution.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Paginate archive list’ is closed to new replies.