Ready to get started?Download WordPress


Pagination when using "Pages" ? (1 post)

  1. CodeyMonkey
    Posted 3 years ago #


    How do I paginate posts when using pages?

    So If I have 25 posts I want 10 per page and it will paginate to the other pages e.g. "View older posts" or Next/previous) that sort of thing.

    <?php $posts = get_posts('numberposts=10&order=ASC&orderby=date');
    foreach ($posts as $post) : start_wp(); ?>
    <h1><?php the_title(); ?></h1>
    <?php echo paginate_links( $args ) ?>
    <?php endforeach; ?>

    So that's a basic way of explaining it.... can't see what i'm doing wrong? Does pages work differently? Does anyone have a solution?

Topic Closed

This topic has been closed to new replies.

About this Topic