I want to show the links to next and previous webpages from my directory. I searched on the web and found this
<?php
$prev_post = get_adjacent_post('', '', true);
$next_post = get_adjacent_post('', '', false);
?>
<p><?php echo $prev_post->post_title; ?></p>
<p><?php echo $next_post->post_title; ?></p>
This is what I want to do, let's say I have three posts. sitename.com/current.php , sitename.com/previous.php , sitename.com/next.php If I am on current.php I want to show links of previous.php and next.php How can I do that?