I have a custom post type set up named ‘projects’. The CPT has a rewrite rule on it to change the slug for the custom posts to ‘portfolio’.
archive-projects is set up, so far so good. However I am having issues with adding previous and next post links to the single-projects.php template. The main issues so far are:
note: the page is currently set up with a standard if, while, have posts php call.
1) When I use the next_post_link or previous_post_link calls, no links show up at all.
2) If I use previous_post or next_post then the links show up, but on the first post both links show the 2nd post in the queue.
Ideally I’d like the first post to only show and next post link and the last showing a previous only, with all the posts in between showing both.
Can anyone help me here please? All other discussions I’ve seen on the web don’t work and I’m starting to pull my hair out!