how to code pagination?
-
hello
I edited my category.php to list only the titles of my post.
<?php $postCount=0; ?> <?php $categoryvariable=$cat; // assign the variable as current category ?> <ul> <?php $myposts = get_posts('category=' . $categoryvariable. '&numberposts=500&offset=0&order=ASC&orderby=post_title'); foreach($myposts as $post) : setup_postdata($post); ?> <div class="entry"> <li> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a> @ <?php the_time('m/d/Y g:i A') ?> <?php edit_post_link(' | Edit'); ?> </li> </div> <?php endforeach; ?> </ul>As you can see, i set the numberpost to 500 so all my blog titles will be listed. However what i really want to do is display the first 100 then the next 100 will be displayed in “page 2” then the next 100 in page 3 and so on
i dont know how to divide these so i will have page 1, page 2 , page 3
can anybody help?
Thanks!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘how to code pagination?’ is closed to new replies.