Fixing Broken Posts Navigation

According to the WordPress codex the get_previous_post and get_next_post should either return null or empty in single posts navigation when you are at the first or last post. If you come across a situation where these two handy functions do not work as expected then most probably you have installed a plugin which is interfering with the posts order hence breaking the functionality of get_previous_post and get_next_post functions. One of those plugins is Post Types Order. If you have installed Post Types Order then try disabling it to see if that resolves the problem for you.

The same case applies to get_adjacent_post because both get_previous_post and get_next_post use get_adjacent_post for the posts navigation in the single post template.


  • Wohh just what I was searching for, appreciate it for posting. I love your website!
  • Jak potrzebujesz suplementy na trądzik to sprawdź mojego bloga. Najlepsze suplementy na trądzik oraz sprawdzone leki.
  • I intended to compose you a bit of note in order to give thanks again for all the breathtaking concepts you've contributed at this time. It's extremely generous of people like you in giving extensively all a few people could have distributed as an e-book in order to make some bucks for their own end, certainly considering that you could have done it if you considered necessary. The concepts additionally acted as the easy way to be certain that most people have a similar dream just as mine to find out a little more pertaining to this issue. I am certain there are millions of more fun opportunities in the future for individuals who looked over your blog post.

Leave a comment