From 5a9c8597ba5b87a0a134bae4716aa290be93822a Mon Sep 17 00:00:00 2001 From: argoexpert press Date: Sat, 25 May 2024 09:56:49 +0300 Subject: [PATCH] add en mobile menu --- category-en.php | 2 +- en/category-en-sub.php | 2 +- en/rubrics-mobile-en.php | 59 ++++++++++++++++++++++++++++++++++++++++ header-en.php | 2 +- 4 files changed, 62 insertions(+), 3 deletions(-) create mode 100644 en/rubrics-mobile-en.php diff --git a/category-en.php b/category-en.php index b85c2c1..4b49055 100644 --- a/category-en.php +++ b/category-en.php @@ -2,7 +2,7 @@
- +
- +

name ?>

diff --git a/en/rubrics-mobile-en.php b/en/rubrics-mobile-en.php new file mode 100644 index 0000000..bcbe3a7 --- /dev/null +++ b/en/rubrics-mobile-en.php @@ -0,0 +1,59 @@ + EN_PARTS, + 'order' => 'ASC', + 'taxonomy' => 'category', + 'hide_empty' => false +); +$categories = get_categories($arg_cat); +$current_term = get_queried_object(); + +// Получаем ID текущей категории или категорий поста +$current_term_ids = []; +if (is_single()) { + $current_term_ids = wp_get_post_categories($current_term->ID); +} elseif (is_category()) { + $current_term_ids[] = $current_term->term_id; +} + +$firstElement = array_shift($categories); +array_push($categories, $firstElement); +?> + \ No newline at end of file diff --git a/header-en.php b/header-en.php index 652c701..100ba11 100644 --- a/header-en.php +++ b/header-en.php @@ -102,7 +102,7 @@ height="0" width="0" style="display:none;visibility:hidden">