Display NEXT and PREVIOUS pagination?
I need help on the pagination. I try to put the NEXT and PREVIOUS pagination that show the post in a same category, but I am not sure what happen that showing nothing.
If you can help, much thanks!
div class="row"
div class="page"
?php
$previous_post = get_previous_post('%link', 'Next post in category', TRUE);
if ( $previous_post ) : ?
!-- [ PREVIOUS ITEM ]--
div class="col-xs-6"
?php if ( has_post_thumbnail( $previous_post-ID ) ) : ?
?php echo get_the_post_thumbnail( $previous_post-ID, 'gallery-navigation' ); ?
?php endif; ?
a href="?php echo get_permalink( $previous_post-ID ); ?"div class="info"
div class="info-gallery"
h2 class="title"?php echo $previous_post-post_title; ?/h2
/div!-- .info-content --
/div/a!---info --
span class="prevnext"?php _e( 'Previous Featured', ); ?/span/div
?php endif; //End of Previous Post Item ?
?php $next_post = get_next_post('%link', 'Next post in category', TRUE);
if ( $next_post ) : ?
!-- [ NEXT ITEM ]--
div class="col-xs-6"
?php if ( has_post_thumbnail( $next_post-ID ) ) {
echo get_the_post_thumbnail( $next_post-ID, 'gallery-navigation' ); }?
a href="?php echo get_permalink( $next_post-ID ); ?"div class="info"
div class="info-gallery"
h2 class="title"?php echo $next_post-post_title; ?/h2
/div!-- .info-content --
/div/a!-- -info --
span class="prevnext"?php _e( 'Next Featured'); ?/span/div
?php endif; //End of Next Post Item ?
/div
/div
Topic next previous pagination Wordpress
Category Web