delete adv
This commit is contained in:
@@ -1,12 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
get_header();
|
get_header();
|
||||||
|
|
||||||
|
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
|
||||||
|
|
||||||
$posts = new WP_Query([
|
$posts = new WP_Query([
|
||||||
'category_name' => get_queried_object()->slug,
|
'category_name' => get_queried_object()->slug,
|
||||||
'post_type' => 'post',
|
'post_type' => 'post',
|
||||||
'posts_per_page' => 10,
|
'posts_per_page' => 10,
|
||||||
'orderby' => 'date',
|
'orderby' => 'date',
|
||||||
'order' => 'ASC'
|
'order' => 'ASC',
|
||||||
|
'paged' => $paged
|
||||||
]);
|
]);
|
||||||
?>
|
?>
|
||||||
<div class="content-middle articles-wrapper">
|
<div class="content-middle articles-wrapper">
|
||||||
|
|||||||
@@ -21,8 +21,10 @@ $partners = new WP_Query([
|
|||||||
$partners->the_post();
|
$partners->the_post();
|
||||||
?>
|
?>
|
||||||
<a href="<?= get_permalink(); ?>" class="partner-item">
|
<a href="<?= get_permalink(); ?>" class="partner-item">
|
||||||
<div class="partner-item__image-container">
|
<div>
|
||||||
<?= show_post_image(); ?>
|
<?if ( has_post_thumbnail() ) {
|
||||||
|
the_post_thumbnail( 'thumbnail' ); // Это выведет самую маленькую превьюшку
|
||||||
|
}?>
|
||||||
</div>
|
</div>
|
||||||
<div class="partner-item__text-container">
|
<div class="partner-item__text-container">
|
||||||
<p class="subtitle-16"><?= get_the_title(); ?></p>
|
<p class="subtitle-16"><?= get_the_title(); ?></p>
|
||||||
|
|||||||
@@ -2,23 +2,26 @@
|
|||||||
$posts->the_post();
|
$posts->the_post();
|
||||||
?>
|
?>
|
||||||
<div class="event-item">
|
<div class="event-item">
|
||||||
<a href="<?= the_permalink() ?>">
|
<!-- <a href="<?= the_permalink() ?>">
|
||||||
<div class="event-item__image-container">
|
<div class="event-item__image-container">
|
||||||
<?= show_post_image(); ?>
|
<?//= show_post_image(); ?>
|
||||||
<div class="event-item__heading">
|
<div class="event-item__heading">
|
||||||
<h2 class="event-item__title"><?= the_title() ?></h2>
|
<h2 class="event-item__title"><?= the_title() ?></h2>
|
||||||
<? if (!empty(get_field('subtitle'))) : ?><p class="event-item__subtitle"><?= get_field('subtitle') ?></p><? endif; ?>
|
<? if (!empty(get_field('subtitle'))) : ?><p class="event-item__subtitle"><?= get_field('subtitle') ?></p><? endif; ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>-->
|
||||||
<div class="event-item__text">
|
<div class="event-item__text">
|
||||||
<div class="event-item__description-block">
|
<!--<div class="event-item__description-block">
|
||||||
<h3 class="event-item__description-header subtitle-13">Организатор</h3>
|
<h3 class="event-item__description-header subtitle-13">Организатор</h3>
|
||||||
<p class="event-item__description-text text-13"><?= get_field('organizer') ?></p>
|
<p class="event-item__description-text text-13"><?= get_field('organizer') ?></p>
|
||||||
</div>
|
</div>-->
|
||||||
<div class="event-item__description-block">
|
<!--<div class="event-item__description-block">
|
||||||
<h3 class="event-item__description-header subtitle-13">Дата</h3>
|
<h3 class="event-item__description-header subtitle-13">Дата</h3>
|
||||||
<p class="event-item__description-text text-13"><?= get_field('event_date') ?></p>
|
<p class="event-item__description-text text-13"><?= get_field('event_date') ?></p>
|
||||||
|
</div>-->
|
||||||
|
<div class="event-item__description-block">
|
||||||
|
<h3 class="event-item__description-header subtitle-13" style="font-size: 1.2em;"><a href="<?= the_permalink() ?>"><?= the_title()?></a></h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="event-item__description-block">
|
<div class="event-item__description-block">
|
||||||
<h3 class="event-item__description-header subtitle-13">Место проведения</h3>
|
<h3 class="event-item__description-header subtitle-13">Место проведения</h3>
|
||||||
@@ -26,7 +29,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="event-item__description-block">
|
<div class="event-item__description-block">
|
||||||
<h3 class="event-item__description-header subtitle-13">О конференции</h3>
|
<h3 class="event-item__description-header subtitle-13">О конференции</h3>
|
||||||
<p class="event-item__description-text text-13"><? the_excerpt(); ?></p>
|
<p class="event-item__description-text text-13"><a href="<?= the_permalink() ?>"><? the_excerpt(); ?></a></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="event-item__description-block">
|
<div class="event-item__description-block">
|
||||||
<h3 class="event-item__description-header subtitle-13">Телефон</h3>
|
<h3 class="event-item__description-header subtitle-13">Телефон</h3>
|
||||||
|
|||||||
@@ -498,7 +498,7 @@ function auto_add_category_by_slug_to_new_post($post_ID, $post, $update)
|
|||||||
wp_set_post_categories($post_ID, array($category->term_id), true);
|
wp_set_post_categories($post_ID, array($category->term_id), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
add_action('save_post', 'auto_add_category_by_slug_to_new_post', 10, 3);
|
//add_action('save_post', 'auto_add_category_by_slug_to_new_post', 10, 3);
|
||||||
|
|
||||||
|
|
||||||
function get_category_name($post = null)
|
function get_category_name($post = null)
|
||||||
@@ -672,7 +672,7 @@ function last_sticky_post() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// отправка писем через свой почтовый сервис
|
||||||
function agroxpert_send_smtp_email( $phpmailer ) {
|
function agroxpert_send_smtp_email( $phpmailer ) {
|
||||||
|
|
||||||
$phpmailer->isSMTP();
|
$phpmailer->isSMTP();
|
||||||
|
|||||||
@@ -2,14 +2,15 @@
|
|||||||
global $wpdb; // Глобальная переменная для работы с базой данных
|
global $wpdb; // Глобальная переменная для работы с базой данных
|
||||||
|
|
||||||
// Запрос для получения ID топ-3 просматриваемых постов
|
// Запрос для получения ID топ-3 просматриваемых постов
|
||||||
$query = "
|
$query = $wpdb->prepare("
|
||||||
SELECT p.ID, p.post_title, pv.count
|
SELECT p.ID, p.post_title, p.post_content, m.meta_value AS position
|
||||||
FROM {$wpdb->prefix}posts p
|
FROM $wpdb->posts p
|
||||||
JOIN {$wpdb->prefix}post_views pv ON p.ID = pv.id AND pv.type = 4
|
INNER JOIN $wpdb->postmeta m ON p.ID = m.post_id
|
||||||
WHERE p.post_status = 'publish' AND p.post_type = 'post'
|
WHERE p.post_type = 'post'
|
||||||
ORDER BY pv.count DESC
|
AND m.meta_key = 'top_participation_position'
|
||||||
LIMIT 3;
|
AND m.meta_value != ''
|
||||||
";
|
ORDER BY CAST(m.meta_value AS UNSIGNED) ASC
|
||||||
|
");
|
||||||
|
|
||||||
$top_posts = $wpdb->get_results($query);
|
$top_posts = $wpdb->get_results($query);
|
||||||
|
|
||||||
|
|||||||
@@ -7,23 +7,12 @@
|
|||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php if (is_active_sidebar('left-sidebar')) : ?>
|
<?php if (is_active_sidebar('left-sidebar')) : ?>
|
||||||
<?php //dynamic_sidebar('left-sidebar'); ?>
|
<?php dynamic_sidebar('left-sidebar'); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
|
||||||
<?php get_template_part('partials/latest-interview-post'); ?>
|
<?php get_template_part('partials/latest-interview-post'); ?>
|
||||||
|
|
||||||
<!-- Yandex.RTB R-A-7761284-3 -->
|
|
||||||
<div id="yandex_rtb_R-A-7761284-3"></div>
|
|
||||||
<script>
|
|
||||||
window.yaContextCb.push(()=>{
|
|
||||||
Ya.Context.AdvManager.render({
|
|
||||||
"blockId": "R-A-7761284-3",
|
|
||||||
"renderTo": "yandex_rtb_R-A-7761284-3"
|
|
||||||
})
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<?php if (is_front_page()) : ?>
|
<?php if (is_front_page()) : ?>
|
||||||
<div class="most-read mobile">
|
<div class="most-read mobile">
|
||||||
<div class="most-read__inner">
|
<div class="most-read__inner">
|
||||||
|
|||||||
@@ -14,10 +14,10 @@ $categoryLink = get_queried_object()->slug;
|
|||||||
<h3 class="event-item__description-header subtitle-13">Организатор</h3>
|
<h3 class="event-item__description-header subtitle-13">Организатор</h3>
|
||||||
<p class="event-item__description-text text-13"><?= get_field('organizer') ?></p>
|
<p class="event-item__description-text text-13"><?= get_field('organizer') ?></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="event-item__description-block">
|
<!--<div class="event-item__description-block">
|
||||||
<h3 class="event-item__description-header subtitle-13">Дата</h3>
|
<h3 class="event-item__description-header subtitle-13">Дата</h3>
|
||||||
<p class="event-item__description-text text-13"><?= get_field('event_date') ?></p>
|
<p class="event-item__description-text text-13"><?= get_field('event_date') ?></p>
|
||||||
</div>
|
</div>-->
|
||||||
<div class="event-item__description-block">
|
<div class="event-item__description-block">
|
||||||
<h3 class="event-item__description-header subtitle-13">Место проведения</h3>
|
<h3 class="event-item__description-header subtitle-13">Место проведения</h3>
|
||||||
<p class="event-item__description-text text-13"><?= get_field('location') ?></p>
|
<p class="event-item__description-text text-13"><?= get_field('location') ?></p>
|
||||||
@@ -29,21 +29,21 @@ $categoryLink = get_queried_object()->slug;
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="event-item__description-block">
|
<div class="event-item__description-block">
|
||||||
<h3 class="event-item__description-header subtitle-13">О конференции</h3>
|
<h3 class="event-item__description-header subtitle-13">О мероприятии</h3>
|
||||||
<p class="event-item__description-text text-13"><? the_content(); ?></p>
|
<p class="event-item__description-text text-13"><? the_content(); ?></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="event-item__image-container">
|
<!--<div class="event-item__image-container">
|
||||||
<?= show_post_image(); ?>
|
<?//= show_post_image(); ?>
|
||||||
<div class="event-item__heading">
|
<div class="event-item__heading">
|
||||||
<h2 class="event-item__title"><?= the_title() ?></h2>
|
<h2 class="event-item__title"><?= the_title() ?></h2>
|
||||||
<? if (!empty(get_field('subtitle'))) : ?><p class="event-item__subtitle"><?= get_field('subtitle') ?></p><? endif; ?>
|
<? if (!empty(get_field('subtitle'))) : ?><p class="event-item__subtitle"><?= get_field('subtitle') ?></p><? endif; ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>-->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<a href="/materialy/<?= $categoryLink; ?>/" class="articles-preview__show-next">Все мероприятия</a>
|
<a href="/events" class="articles-preview__show-next">Все мероприятия</a>
|
||||||
<div class="articles__spacer-container">
|
<div class="articles__spacer-container">
|
||||||
<div class="articles__spacer"></div>
|
<div class="articles__spacer"></div>
|
||||||
<div class="articles__spacer"></div>
|
<div class="articles__spacer"></div>
|
||||||
|
|||||||
11
single.php
11
single.php
@@ -44,16 +44,7 @@
|
|||||||
<div class="article-social">Подписывайтесь на нас в <a href="https://dzen.ru/agroexpert_press?favid=254170145" target="_blank">Дзен</a> и <a href="https://t.me/agroexpert_press" target="_blank">Telegram</a></div>
|
<div class="article-social">Подписывайтесь на нас в <a href="https://dzen.ru/agroexpert_press?favid=254170145" target="_blank">Дзен</a> и <a href="https://t.me/agroexpert_press" target="_blank">Telegram</a></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Yandex.RTB R-A-7761284-2 -->
|
|
||||||
<div id="yandex_rtb_R-A-7761284-2"></div>
|
|
||||||
<script>
|
|
||||||
window.yaContextCb.push(()=>{
|
|
||||||
Ya.Context.AdvManager.render({
|
|
||||||
"blockId": "R-A-7761284-2",
|
|
||||||
"renderTo": "yandex_rtb_R-A-7761284-2"
|
|
||||||
})
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
<?php get_template_part('partials/featured-posts'); ?>
|
<?php get_template_part('partials/featured-posts'); ?>
|
||||||
<?php if (!in_category('partners')) : ?>
|
<?php if (!in_category('partners')) : ?>
|
||||||
<?php get_template_part('partials/related-posts'); ?>
|
<?php get_template_part('partials/related-posts'); ?>
|
||||||
|
|||||||
@@ -30,9 +30,9 @@
|
|||||||
$formatted_date = format_event_date();
|
$formatted_date = format_event_date();
|
||||||
?>
|
?>
|
||||||
<div class="upcoming-event">
|
<div class="upcoming-event">
|
||||||
<div class="article-time">
|
<!--<div class="article-time">
|
||||||
<img src="<?= get_asset('/icons/time.svg'); ?>" alt="" /><?php echo $formatted_date; ?>
|
<img src="<?= get_asset('/icons/time.svg'); ?>" alt="" /><?php echo $formatted_date; ?>
|
||||||
</div>
|
</div>-->
|
||||||
<a class="link" href="<?php the_permalink(); ?>">
|
<a class="link" href="<?php the_permalink(); ?>">
|
||||||
<?php the_title(); ?>
|
<?php the_title(); ?>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user