From acde7f0e8bd076b5fccdb9a92132e5aa2cb9a4f5 Mon Sep 17 00:00:00 2001 From: "arlemp@selectel.ru" Date: Thu, 9 Dec 2021 22:29:24 +0300 Subject: [PATCH] add eng version --- blocks/gamburger.php | 47 ++++++++++++++++++++++++++++++++++++++++++++ blocks/header.php | 37 +++++++--------------------------- blocks/leftmenu.php | 12 ++++++++++- blocks/yets.php | 7 +++++-- category-4782.php | 4 ++-- functions.php | 22 +++++++++++++++++++++ header.php | 18 ++++++++++++++++- single-4782.php | 17 ++++++++++------ style.css | 31 ++++++++++++++++++----------- 9 files changed, 141 insertions(+), 54 deletions(-) create mode 100644 blocks/gamburger.php diff --git a/blocks/gamburger.php b/blocks/gamburger.php new file mode 100644 index 0000000..3f1dfc0 --- /dev/null +++ b/blocks/gamburger.php @@ -0,0 +1,47 @@ + + + + +
+ +
+ +
+ + 'main_main', + 'menu' => 'mob_topmenu', + 'menu_id' => 'gamburer_menu' + ) ); **/?> + +
+
+ +
+
< назад
+ 'menu_left', + 'menu'=>$left_mob_menu + ));?> + +
+
diff --git a/blocks/header.php b/blocks/header.php index a67e4b7..8a57f25 100644 --- a/blocks/header.php +++ b/blocks/header.php @@ -1,37 +1,8 @@
- -
+ -
- -
- - 'main_main', - 'menu' => 'mob_topmenu', - 'menu_id' => 'gamburer_menu' - ) ); **/?> - -
-
- -
-
< назад
- 'menu_left', - 'theme_location'=>'left' - ));?> - -
-
- @@ -72,6 +43,12 @@
  • + +
  • РУС
  • + +
  • EN
  • + + diff --git a/blocks/leftmenu.php b/blocks/leftmenu.php index 76ddb09..09e738c 100644 --- a/blocks/leftmenu.php +++ b/blocks/leftmenu.php @@ -1,8 +1,18 @@ \ No newline at end of file diff --git a/blocks/yets.php b/blocks/yets.php index adbd0be..4afdff7 100644 --- a/blocks/yets.php +++ b/blocks/yets.php @@ -14,8 +14,11 @@ # вывод поста if( $posts ):?> - -
    Еще по теме
    + +
    More on the topic
    + +
    Еще по теме
    +
    diff --git a/category-4782.php b/category-4782.php index a55c5e9..b68b871 100644 --- a/category-4782.php +++ b/category-4782.php @@ -33,7 +33,7 @@ $nn = 0;?>

    -
    +
    post_date, false );?>
    @@ -54,7 +54,7 @@ $nn = 0;?>

    -
    +
    post_date, false );?>
    diff --git a/functions.php b/functions.php index 707be60..395bc1e 100644 --- a/functions.php +++ b/functions.php @@ -484,6 +484,28 @@ function citata_title($percon){ } +# helper find perevod author +function find_perevod($post_id){ + + $author = ''; + + $perevod_name = get_post_meta( $post_id, 'perevod_name', true ); + if ( ! empty ( $perevod_name )){ + $user_info = get_userdata($perevod_name); + if (isset($user_info->display_name)){ + $author = $user_info->display_name; + } + } + + if ($author !== ''){ + return " / Translated by $author"; + } + else { + return ''; + } + + +} add_action( 'pre_get_posts', function ($query) { diff --git a/header.php b/header.php index ba51e6b..28430a7 100644 --- a/header.php +++ b/header.php @@ -4,7 +4,7 @@ <?php wp_title('|', true, 'right');?><?=get_bloginfo('name')?> - + @@ -29,6 +29,22 @@ + diff --git a/single-4782.php b/single-4782.php index 6981300..9119194 100644 --- a/single-4782.php +++ b/single-4782.php @@ -25,7 +25,7 @@