I’m currently using the ‘Advanced Custom Field’ WordPress plugin, and I’m wondering if it’s possible to paginate my results.
Here is the code I’m using on a custom page template:
<?php while ( have_posts() ) : the_post(); ?>
<?php
$args = array( 'posts_per_page' => 5, 'meta_key' => 'course_date', 'order'=> 'ASC', 'orderby' => 'meta_value', 'category' => 2 );
$postslist = get_posts( $args );
foreach ( $postslist as $post ) :
setup_postdata( $post ); ?>
<!--- CONTENT --->
<?php
endforeach;
wp_reset_postdata();
?>
You have to use WP_Query class http://codex.wordpress.org/Class_Reference/WP_Query
this might work for you.