I’m using wordpress 3.1
I got 3 types of custom types : videos, galleries and podcasts. They use the default taxonomy categories.
When viewing a single custom post let’s say a video, the next_post_link() (or previous_post_link) function works as planed but it links only to the next or previous post from this custom post type.
How could I get it to display the next post from any post type? tried to search hours on google without finding anything relevant to this. Anyone facing the same issue?
You’ll need to remove the
post_typeclause from the SQL query used to retrieve the adjacent post. This can be done by hooking into theget_next_post_whereandget_previous_post_wherefilters, although it’s not ideal as the SQL query is passed as a single string.