This commit is contained in:
Dekart Deploy Bot 2026-11-14 18:57:22 +00:00
parent b1f00b61a8
commit 813dcb4ae7

View File

@ -31,6 +31,26 @@ function dekart_robots_disallows(string $path): bool
return false;
}
// авторские архивы выключены: дубль блога без своего контента
add_action('init', function () {
$titles = get_option('wpseo_titles');
if (! is_array($titles) || ! empty($titles['disable-author'])) {
return;
}
$titles['disable-author'] = true;
update_option('wpseo_titles', $titles);
}, 21);
add_action('template_redirect', function () {
if (! is_author()) {
return;
}
global $wp_query;
$wp_query->set_404();
status_header(404);
nocache_headers();
}, 1);
// таксономии с noindex,follow (functions.php)
function dekart_sitemap_noindex_taxonomies(): array
{