Languages: English • Italiano • 한국어 • 日本語 • (Add your language)
Retrieve next post that is adjacent to current post.
<?php get_next_post( $in_same_term, $excluded_terms, $taxonomy ) ?>
<?php $next_post = get_next_post(); if (!empty( $next_post )): ?> <a href="<?php echo get_permalink( $next_post->ID ); ?>"><?php echo $next_post->post_title; ?></a> <?php endif; ?>
Since: 1.5.0
get_next_post() is located in wp-includes/link-template.php
.
get_previous_post(), get_adjacent_post()