Hi there,
1. You would need to use this PHP snippet:
function exclude_categories_home( $query ) {
if ( $query->is_home() && $query->is_main_query() ) {
$query->set( 'cat', '-1, -5, -10' );
}
return $query;
}
add_filter( 'pre_get_posts', 'exclude_categories_home' );
The -1, -5, -10 are the Category ID’s you want to remove. They must be prefixed by the -
2. Post Navigation set to within same category – try this snippet:
add_action( 'after_setup_theme', 'tu_category_specific_post_navigation' );
function tu_category_specific_post_navigation() {
add_filter( 'generate_category_post_navigation', '__return_true' );
}
https://docs.generatepress.com/article/adding-php/