From 25df0b2c1098ba731a4964fc832e5835dde5b93b Mon Sep 17 00:00:00 2001 From: AK Delfin Date: Wed, 6 Apr 2022 00:10:37 +0300 Subject: [PATCH] add new concurs --- blocks/events.php | 2 +- blocks/golos.php | 21 ++++++++ category-5122.php | 88 ++++++++++++++++++++++++++++++++++ footer.php | 29 +++++++---- header.php | 10 +++- single-5122.php | 112 +++++++++++++++++++++++++++++++++++++++++++ single.php | 4 +- src/calend-block.php | 7 ++- style.css | 43 +++++++++++++++-- 9 files changed, 295 insertions(+), 21 deletions(-) create mode 100644 blocks/golos.php create mode 100644 category-5122.php create mode 100644 single-5122.php diff --git a/blocks/events.php b/blocks/events.php index 187a810..44d20c7 100644 --- a/blocks/events.php +++ b/blocks/events.php @@ -17,7 +17,7 @@ $posts = get_posts( array( ), ), 'post_type' => 'post', - //'post_status' => 'publish', + 'post_status' => 'publish', 'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса ) ); diff --git a/blocks/golos.php b/blocks/golos.php new file mode 100644 index 0000000..c1f801a --- /dev/null +++ b/blocks/golos.php @@ -0,0 +1,21 @@ + + + + +
+
+
+ + + +
+ +

Спасибо за Ваш голос

+ +
+ + +
+ $curr_id?> +
+ diff --git a/category-5122.php b/category-5122.php new file mode 100644 index 0000000..3205284 --- /dev/null +++ b/category-5122.php @@ -0,0 +1,88 @@ + + +term_id; + +$part_args = [ + 'category__in' => $current_cat_id, + 'posts_per_page' => 23, + 'paged' => $paged + +]; + +$part_query = new WP_Query( $part_args ); + + +?> + +
+ + + + +

+ +have_posts()) :?> + + have_posts() ) : + + $part_query->the_post();?> + +
+ +
+ + + <?the_title();?> + + + + + + + +
+
+
+ +
+ + + + + +max_num_pages = $part_query->max_num_pages?> + + + + + + + +
+ + \ No newline at end of file diff --git a/footer.php b/footer.php index 1b3b2f3..83f2ec7 100644 --- a/footer.php +++ b/footer.php @@ -41,7 +41,7 @@ - + + + + + + diff --git a/header.php b/header.php index acab86b..309b800 100644 --- a/header.php +++ b/header.php @@ -8,7 +8,7 @@ - + @@ -65,7 +65,13 @@ - + + + +
+ +
+ + +
+ + + + + + term_id; + $category_link = get_category_link($category_id); + + + $votes_file = '/vhosts/beta/wp-content/themes/vij/golos.json'; + + if (file_exists($votes_file)){ + $votes = json_decode(file_get_contents($votes_file, true)); + } + + + ?> + + + + +

+ + +
+ <?the_title();?> +
+
+ +
+ + + + + +
Другие участники
+ + + +
+ +
+ +
+
+ +
+
+ + + + + + +
+ + + + + + + + + + + + + + + diff --git a/single.php b/single.php index ac755c3..4b76813 100644 --- a/single.php +++ b/single.php @@ -25,7 +25,7 @@