I need to generate a button for the next category post and am using the following code
<?php next_post_link('%link','<span class="button-1">%title</span>',TRUE); ?>
But it does include posts from other categories even if you set the parameter $ in_same_term to TRUE, and excluding other categories with the $ excluded_terms parameter, modifying these parameters causes no effect on the generated link, only the $ format and $ link parameters work.
I inserted this code into a content-news.php file which is called inside single.php.