Get Adjacent Post By Tag

In this answer — How to Get Next or Previous Post in a Specific Tag? — a working function is provided to generate “next/prev” links by tag rather than category.

How could one make this so that you can specify exactly which tag to generate next/previous links for? As it is, it appears to only allow you to exclude tags from consideration. As posts tend to have many tags, it’s seems unreliable (with the function as-is) to reply on the in_same_tag option.

Related posts

Leave a Reply

1 comment