Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter zuperm4n

    (@zuperm4n)

    Okay, I’ve solved my issue (so soon!?!?).

    I’ll leave this post here in case someone else has this issue.

    The WordPress Codex says:

    Add the $max_pages parameter to the next_posts_link() function when querying the loop with WP_Query

    I did initially do this by replacing:
    <?php next_posts_link( 'More' ); ?>
    with
    <?php echo get_next_posts_link( 'Older Entries', $the_query->max_num_pages );
    from an online tutorial but I forgot to change ‘$the_query‘ to ‘$query‘.

    So to confirm, if you are using WP_Query to query your loop, you need to use <?php echo get_next_posts_link( 'Older Entries', $the_query->max_num_pages ); for pagination.

Viewing 1 replies (of 1 total)