From 529d07ee38c792da2c614d185e87464482a45cd1 Mon Sep 17 00:00:00 2001 From: NIU Administrator Date: Tue, 19 Apr 2022 16:49:40 +0900 Subject: [PATCH] redirect to english page at online-bsss category. --- category.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/category.php b/category.php index 6442fd7..869a4d9 100644 --- a/category.php +++ b/category.php @@ -6,12 +6,18 @@ * @version 1.0.0 */ - get_header(); - $postType = get_post_type(); - global $wp_query; $tax_slug = $wp_query->get_queried_object(); $isNoSideBar = 'online-bsss' === $tax_slug->slug; +$lang = get_query_var('lang', ''); +if ($tax_slug->slug === 'online-bsss' && $lang === 'ja') { + $url = site_url('/online-bsss'); + wp_safe_redirect($url, 301); + exit; +} + +get_header(); +$postType = get_post_type(); if ( !$postType ) { global $wp_query;