/**
* Return the URL of the current term if the page is an archive page.
*/
add_filter('splx_pagination_next_url_permalink', function($permalink) {
$result = $permalink;
if (is_archive()) {
$term = get_queried_object();
if ($term) {
$term_permalink = get_term_link($term);
if ($term_permalink) {
$result = $term_permalink;
}
}
}
return $result;
}, 10, 1);
Closes #120
Example usage: