Is there an easy way to link to a specific page/post outside the loop? I used the get_permalink()
code as follows.
<a href="<?php echo get_permalink( 164 ); ?>/post-slug/"> </a>
But this meant that I had to get the post ID from the Shortlink in the Admin for the post I wanted and then append the slug to it. Is there a better way to get the post ID of the post I am looking for, without using the loop?
My permalinks are set up to use the post name so this seemed to work.