The method given in the WPSE answer you linked would exclude posts from the categories listed by ID in the array when the current query is the home blog page (not an archive page, or a category page, etc.). It is also not intended to affect secondary queries on the page. Placed in the functions.php of theme, it should do just that.
modified comments and added your 5 cat IDs:
function my_exclude_category( $query ) {
if ( $query->is_home() && $query->is_main_query() ) {
//check it is home blog page and the query is main query, not a secondary query
$query->set( 'category__not_in', array( 89, 90, 91, 92, 93 ) );
//adds this query var to home page main query
}
}
add_action( 'pre_get_posts', 'my_exclude_category' );
//this is hooked right before query
More info on Wp_Query
class category args || pre_get_posts()
action hook
To instead add the category__not_in
parameter to the $args
array of the function you included:
$args = array(
'posts_per_page' => $numberposts,
'post_status' => 'publish',
'category__not_in' => array( 89, 90, 91, 92, 93 ),
'post_type' => 'post',
'orderby' => 'post_date',
...(etc)