Working with Next and Prev links in Single Taxonomy Templates

The next_post_link() and previous_post_link() functions take in_same_term parameter, which is set to FALSE by default. You will find a complete description of the functions here and here.

in_same_term (boolean) (optional)

Indicates whether previous post must be within the same taxonomy term as the current post. If set to ‘true’, only posts from the current taxonomy term will be displayed. If the post is in both the parent and subcategory, or more than one term, the previous post link will lead to the previous post in any of those terms.

Example:

echo previous_post_link( '« %link', '%title', TRUE, ' ', 'series' );

error code: 523