<?php
add_filter( 'aioseo_public_taxonomies', 'aioseo_filter_public_taxonomies' );
function aioseo_filter_public_taxonomies( $taxonomies ) {
$filteredTaxonomies = [];
foreach ( $taxonomies as $taxonomiesObject ) {
if ( 'genre' === $taxonomiesObject['name'] ) {
continue;
}
$filteredTaxonomies[] = $taxonomiesObject;
return $filteredTaxonomies;