Limit post navigation to the current category

Post navigation in a single post page is used to navigate to the next or previous post and is usually displayed at the bottom of the single post. The theme docs have also a useful article on how to change the default stacked layout to an inline one as well as changing the icon type to either Font or SVG.

As almost everything in GeneratePress is filterable, though, we have the freedom to apply filters to change default functionality. In our case, we can set the post navigation to only apply to posts of the same category as the post currently being viewed.

Put the following code to your functions.php or through the use of a functionality plugin.

add_filter( 'generate_post_navigation_args', function( $args ) {
    $args['in_same_term'] = true;

    return $args;
} );

I would suggest using a child theme if editing the functions.php file.