I have entry linking working in multiple templates on my current EE site. In one of my channels, when I get to the end of the loop, it's displaying a next link to an entry in a different channel. It is the next sequencial entry ID though. There isn't a previous link when i'm at the first entry in the loop. The entry that is displaying in the in correct channel shares the same parent page.
Here's my structure hierarchy
About Us
- Leadership
- has listing entries that have next/previous entry linking. Last entry has entry_id 106
- Galleries
- Video Galleries
- Page 1 Child page with entry_id 107
- Page 2
Next/Previous entry linking logic
<p class="next_prev_nav">
{exp:channel:prev_entry channel="leadership"}
<a href="/about-us/senior-leadership/{url_title}" title="{title}">Previous</a>
{/exp:channel:prev_entry}
{exp:channel:next_entry channel="leadership}
<a href="/about-us/senior-leadership/{url_title}" title="{title}">Next</a>
{/exp:channel:next_entry}
</p>
I tried to just do a quick hack and add entry_id="not 107" on the next_entry tag but that broke the next link for all listing pages. Entry ID 107 has it's own channel for videos, so it's not a rogue entry. Any one know how to fix this?