<?php $prev_post = get_adjacent_post( true, '', true ); $next_post = get_adjacent_post( true, '', false ); if($next_post == '') { $next_post = get_boundary_post(); } if($prev_post == '') { $prev_post = get_boundary_post(); //??? } $prev_post_id = $prev_post->ID; $next_post_id = $next_post->ID; <a href="<?php echo get_permalink($prev_post); ?>">previous</a> <a href="<?php echo get_permalink($next_post); ?>">next</a> ?>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)