Try this PHP snippet here:
add_filter( 'generate_category_list_output','lh_remove_singlecategories' );
function lh_remove_singlecategories( $categories ) {
if ( is_single() ) {
return '';
}
return $categories;
}
add_action( 'generate_before_entry_title','lh_single_cats_above_title' );
function lh_single_cats_above_title() {
if ( is_single() ) {
$categories_list = get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'generatepress' ) );
if ( $categories_list ) {
printf( '<span class="entry-meta cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
_x( 'Categories', 'Used before category names.', 'generatepress' ),
$categories_list
);
}
}
}
Adding PHP: https://docs.generatepress.com/article/adding-php/
Let me know π