Add Noindex & Nofollow Attributes to all the Posts

add_filter( ‘aioseo_robots_meta’, ‘aioseo_filter_robots_meta’ ); function aioseo_filter_robots_meta( $attributes ) { if ( is_singular() ) { $attributes[‘noindex’] = ‘noindex’; $attributes[‘nofollow’] = ‘nofollow’; } return $attributes; }Continue reading

Remove Specific Taxonomy From Public Taxonomies List

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; }Continue reading

Remove Specific Post Type From Public Post Type List

add_filter( ‘aioseo_public_post_types’, ‘aioseo_filter_public_post_types’ ); function aioseo_filter_public_post_types( $postTypes ) { $filteredPostTypes = []; foreach ( $postTypes as $postTypeObject ) { if ( is_array( $postTypeObject ) && ‘movie’ === $postTypeObject[‘name’] ) { continue; } $filteredPostTypes[] = $postTypeObject; } return $filteredPostTypes; }Continue reading