I want to display links to each post outside of the Loop.
This code works:
<ul class="nav">
<li><a href="#how"> <?php echo get_the_title(6); ?> </a></li>
<li><a href="#logistics"> <?php echo get_the_title(9); ?> </a></li>
<li><a href="#who"> <?php echo get_the_title(11); ?> </a></li>
<li><a href="#tips"> <?php echo get_the_title(13); ?> </a></li>
</ul>
But, it's calling the title based on the post ID. I want to call the title based on the slug. Any way to do that?