On my Wordpress webpage, I have several Pages. Now I want to display "Next Page" & "Previous Page" links. I know that there are several ways out there to do this, but they all fail because I want to skip one page using this link system.
The existing Wordpress functions for this can exclude pages, but if the next page is the page that should be excluded, no link is displayed. I need a solution to just skip the excluded page.
As my English isn't best, here is an example of what I need:
The current page id is 3.
The page I want to exclude has page id 4.
So the "Next page" link should point to page id 5, the "Previous page" link to page id 2.
How is this possible?
I Actually tried this by myself and was able to get the ID of the next page using
get_pages and some PHP functions, but I failed to exclude the page. If needed I can post the code for that.
Please help me!