WordPress.org

Support

Support » How-To and Troubleshooting » Pagination when using "Pages" ?

Pagination when using "Pages" ?

  • CodeyMonkey
    Member

    @codeymonkey

    Hi,

    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?

  • The topic ‘Pagination when using "Pages" ?’ is closed to new replies.