Languages: English • Italiano • 한국어 • 日本語 Português do Brasil • (Add your language)
It returns object(array of post) by publishing date.
<?php get_boundary_post( $in_same_cat, $excluded_categories, $start, $taxonomy ); ?>
Link with title of first post in current post's category.
<?php $first= get_boundary_post(true, , true, 'category'); if (!empty($first)) { foreach ($first as $post) { ?> <a href="<?php echo the_permalink($post->ID); ?>"><?php echo $post->post_title; ?></a> <?php }} ?>
Link with title of latest post in current post's category.
<?php $latest= get_boundary_post(true, , false, 'category'); if (!empty($latest)) { foreach ($latest as $post) { ?> <a href="<?php echo the_permalink($post->ID); ?>"><?php echo $post->post_title; ?></a> <?php }} ?>
get_boundary_post() will set the post pointer to the first post.
Since: 2.8.0
get_boundary_post() is located in wp-includes/link-template.php
.