Plugin pagination doesn't work
-
Hi,
I have created an events plugin and want to include pagination.
But somehow I cannot make it work.I have wrapped my loop in a shortcode function and this is what I have so far:
$events = new WP_Query( $args ); if ( $events->have_posts() ) : while( $events->have_posts() ): $events->the_post(); echo '<div id="wrapper">'; echo '<h4>'; echo the_title(); echo '</h4>'; the_content(); echo '</div>'; endwhile; next_posts_link( 'Older posts' ); previous_posts_link( 'Newer posts' ); else: echo '<p>'; _e('There are no upcoming events.'); echo '</p>'; endif;
Works fine, correct number of posts set in Settings > Reading is displayed, but no pagination visible. So what am I missing here?
Guido
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Plugin pagination doesn't work’ is closed to new replies.