next_post_link () function for posts in the same category does not work

0

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.

    
asked by anonymous 01.09.2016 / 14:41

0 answers