I’m trying to figure out how to create a Next/Previous navigation system for posts within a custom taxonomy.
I think an example would be easiest. If I have two custom taxonomies: Color and Shape. In my sidebar, I have a menu that lists with posts from each taxonomy term. So Post 1 is under the term Red (Color) and Round (Shape). If I click on Post 1, I want to figure out how to navigate to Post 2 which is also Red (Shape), but Square (Shape).
So if I click on Post 1 from the side under the list of Red posts, I want to be able to navigate through all the Red posts, but not the other taxonomy terms. I don’t want to get a post that is Round but Yellow from Post 1 for example.
Does that make sense?
I was thinking that it would be some tweak of next_post_link/previous_post_link, but I’m not sure exactly how. I’d appreciate suggestions.