I couldn’t understand your question. exactly
-
Do you want next, prev post pagination?
or
-
You want to see next and prev posts titles or other content?
Actually you placed an incorrect value to offset. You have to do something like this.
// Initialize where to start the post from, 0 is most recent post
$init_count = 0;
// Get the current page integer
$page = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1;
// And the simple formula for offset is this
$offset = ( $page - 1 ) * $init_count;
//Now you should use your query like this:
<?php $upcoming_events_args = array(
'post_type' => 'event',
'meta_key' => 'start_date', // name of custom field
'orderby' => 'meta_value_num',
'order' => 'ASC',
'posts_per_page' => '3',
'number' => $init_count,
'page' => $page,
'offset' => $offset,
'meta_query' => array(
array(
'key' => 'start_date',
'value' => $date_of_page,
'compare' => '>=',
'type' => 'DATE'
))
);
And by placing this code after end of the loop, will show your next and previous post.
<ul class="pagination">
<li id="previous-posts">
<?php previous_posts_link( '<< Previous Posts', $custom_query->max_num_pages ); ?>
</li>
<li id="next-posts">
<?php next_posts_link( 'Next Posts >>', $custom_query->max_num_pages ); ?>
</li>
</ul>