get_boundary_post wordpress
<?php // Link with title of latest post in current post’s category $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 }} ?>