From b80c317217d874f474d7ab7de85bda8e68f2d44c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Baumg=C3=A4rtner?= Date: Sat, 23 Dec 2023 15:09:00 +0100 Subject: [PATCH] disabled author pages --- functions.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/functions.php b/functions.php index 7c40e7c..0b8d11b 100644 --- a/functions.php +++ b/functions.php @@ -134,3 +134,13 @@ function fkinfood_register_block_styles() { } add_action( 'init', 'fkinfood_register_block_styles' ); + +function disable_author_page() { + global $wp_query; + + if ( is_author() ) { + wp_redirect(get_option('home'), 301); + exit; + } +} +add_action( 'template_redirect', 'disable_author_page' ); \ No newline at end of file