Skip to main content
deleted 4 characters in body
Source Link
Laxmana
  • 1.3k
  • 12
  • 20

From WordPress Codex:

Add the $max_pages parameter to the next_posts_link() function when querying the loop with WP_Query. To get the total amount of pages you can use the 'max_num_pages' property of the custom WP_Query object.

So:

next_posts_link( __( '<span'Next <span class="meta-nav">&larr;<nav">&rarr;</span> Previous'span>', 'domain' ), $loop->max_num_pages );

From WordPress Codex:

Add the $max_pages parameter to the next_posts_link() function when querying the loop with WP_Query. To get the total amount of pages you can use the 'max_num_pages' property of the custom WP_Query object.

So:

next_posts_link( __( '<span class="meta-nav">&larr;</span> Previous', 'domain' ), $loop->max_num_pages );

From WordPress Codex:

Add the $max_pages parameter to the next_posts_link() function when querying the loop with WP_Query. To get the total amount of pages you can use the 'max_num_pages' property of the custom WP_Query object.

So:

next_posts_link( __( 'Next <span class="meta-nav">&rarr;</span>', 'domain' ), $loop->max_num_pages );
Source Link
Laxmana
  • 1.3k
  • 12
  • 20

From WordPress Codex:

Add the $max_pages parameter to the next_posts_link() function when querying the loop with WP_Query. To get the total amount of pages you can use the 'max_num_pages' property of the custom WP_Query object.

So:

next_posts_link( __( '<span class="meta-nav">&larr;</span> Previous', 'domain' ), $loop->max_num_pages );