I am trying to create a condition that echos the permalink for the latest post when displaying the oldest post (think of this like a post carousel)
Something like this:
if (current_post == oldest_post) {
echo "url for latest post";
} else {
previous_post_link('%link', 'next', TRUE); //previous because it would be next oldest on the list in this case
}
Thanks!