2026-10-05 GLOBAL
This commit is contained in:
parent
d923311deb
commit
1310a020fd
@ -11518,21 +11518,28 @@ main > .pksh-section:first-child {
|
||||
}
|
||||
|
||||
/* ── 20. Teachers Cards (shared) ── */
|
||||
.teachers-cards__wrapper {
|
||||
/* Сетка карточек (общая для /our-teachers/ и блока «Наши преподаватели») */
|
||||
.teachers-cards__grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
gap: clamp(16px, 1.8vw, 24px);
|
||||
justify-content: center;
|
||||
}
|
||||
.teachers-cards__item {
|
||||
min-width: 0;
|
||||
gap: clamp(14px, 1.6vw, 22px);
|
||||
}
|
||||
/* Широкий десктоп — по 5 карточек в ряд */
|
||||
@media (min-width: 1440px) {
|
||||
.teachers-cards__wrapper {
|
||||
.teachers-cards__grid {
|
||||
grid-template-columns: repeat(5, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
@media (max-width: 1024px) {
|
||||
.teachers-cards__grid {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
@media (max-width: 768px) {
|
||||
.teachers-cards__grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
.teachers-cards__card {
|
||||
background: var(--color-bg);
|
||||
border-radius: var(--pksh-radius-card, 24px);
|
||||
@ -11673,13 +11680,6 @@ main > .pksh-section:first-child {
|
||||
outline-offset: 3px;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.teachers-cards__wrapper {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 639px) {
|
||||
.bento .bento__full {
|
||||
min-width: 0;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -123,17 +123,6 @@
|
||||
padding: 64px 0 48px;
|
||||
background: var(--color-bg, #FFFFFF);
|
||||
}
|
||||
.teachers-cards__grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
gap: clamp(14px, 1.6vw, 22px);
|
||||
}
|
||||
/* Широкий десктоп — по 5 карточек в ряд */
|
||||
@media (min-width: 1440px) {
|
||||
.teachers-cards__grid {
|
||||
grid-template-columns: repeat(5, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
.teachers-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@ -345,12 +334,6 @@
|
||||
}
|
||||
|
||||
/* ── Адаптив ── */
|
||||
@media (max-width: 1024px) {
|
||||
.teachers-cards__grid {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.teachers-hero .ds-hero__photo-frame {
|
||||
width: 220px;
|
||||
@ -373,9 +356,6 @@
|
||||
.teachers-cta {
|
||||
padding: var(--space-4, 24px) 0;
|
||||
}
|
||||
.teachers-cards__grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
.teachers-trust__grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1142,7 +1142,7 @@
|
||||
.page-elementary-school .btn-primary,
|
||||
.page-elementary-school .cta-consultation__btn,
|
||||
.page-elementary-school .price-block__btn,
|
||||
.page-elementary-school .teachers-cards__btn,
|
||||
.page-elementary-school .teachers-card__btn,
|
||||
.page-elementary-school .sticky-cta-mobile__btn,
|
||||
.page-elementary-school .sticky-cta-desktop__btn,
|
||||
.page-elementary-school .final-cta-school .btn-write {
|
||||
@ -1170,7 +1170,7 @@
|
||||
.page-elementary-school .btn-primary:hover,
|
||||
.page-elementary-school .cta-consultation__btn:hover,
|
||||
.page-elementary-school .price-block__btn:hover,
|
||||
.page-elementary-school .teachers-cards__btn:hover,
|
||||
.page-elementary-school .teachers-card__btn:hover,
|
||||
.page-elementary-school .sticky-cta-mobile__btn:hover,
|
||||
.page-elementary-school .sticky-cta-desktop__btn:hover,
|
||||
.page-elementary-school .final-cta-school .btn-write:hover {
|
||||
@ -1182,7 +1182,7 @@
|
||||
.page-elementary-school .btn-primary:active,
|
||||
.page-elementary-school .cta-consultation__btn:active,
|
||||
.page-elementary-school .price-block__btn:active,
|
||||
.page-elementary-school .teachers-cards__btn:active,
|
||||
.page-elementary-school .teachers-card__btn:active,
|
||||
.page-elementary-school .sticky-cta-mobile__btn:active,
|
||||
.page-elementary-school .sticky-cta-desktop__btn:active,
|
||||
.page-elementary-school .final-cta-school .btn-write:active {
|
||||
@ -1192,7 +1192,7 @@
|
||||
.page-elementary-school .btn-primary:focus-visible,
|
||||
.page-elementary-school .cta-consultation__btn:focus-visible,
|
||||
.page-elementary-school .price-block__btn:focus-visible,
|
||||
.page-elementary-school .teachers-cards__btn:focus-visible,
|
||||
.page-elementary-school .teachers-card__btn:focus-visible,
|
||||
.page-elementary-school .sticky-cta-mobile__btn:focus-visible,
|
||||
.page-elementary-school .sticky-cta-desktop__btn:focus-visible,
|
||||
.page-elementary-school .final-cta-school .btn-write:focus-visible {
|
||||
@ -1398,10 +1398,10 @@
|
||||
}
|
||||
|
||||
/* ── Teachers CTA: единый лейбл (вместо «к этому педагогу») ── */
|
||||
.page-elementary-school .teachers-cards__btn {
|
||||
.page-elementary-school .teachers-card__btn {
|
||||
font-size: 0;
|
||||
}
|
||||
.page-elementary-school .teachers-cards__btn::after {
|
||||
.page-elementary-school .teachers-card__btn::after {
|
||||
content: 'Записаться на экскурсию';
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
// Секция преподавателей
|
||||
// Секция преподавателей (блок на страницах) — карточка общая с /our-teachers/
|
||||
|
||||
if (! defined('ABSPATH')) {
|
||||
exit;
|
||||
@ -34,85 +34,15 @@ $teachers_query = new WP_Query($query_args);
|
||||
<?php endif; ?>
|
||||
<h2 class="bento-h2"><?php echo esc_html($title); ?></h2>
|
||||
<p class="bento-p"><?php echo esc_html($description); ?></p>
|
||||
|
||||
</div>
|
||||
<div class="bento__full">
|
||||
<div class="teachers-cards__scroll-hint" aria-hidden="true">👆 Листайте карточки преподавателей →</div>
|
||||
<div class="teachers-cards__scroll-x">
|
||||
<div class="teachers-cards__wrapper">
|
||||
<?php if ($teachers_query->have_posts()) : ?>
|
||||
<?php while ($teachers_query->have_posts()) :
|
||||
$teachers_query->the_post();
|
||||
|
||||
$t_id = get_the_ID();
|
||||
$t_name = get_the_title();
|
||||
$t_subj = get_post_meta($t_id, '_teacher_direction', true);
|
||||
$t_about = get_post_meta($t_id, '_teacher_description', true);
|
||||
$t_badge = get_post_meta($t_id, '_teacher_badge', true);
|
||||
$t_photo = get_post_meta($t_id, '_teacher_avatar', true);
|
||||
$start_year = carbon_get_post_meta($t_id, 'teacher_start_year');
|
||||
|
||||
$t_exp = '';
|
||||
if ($start_year && is_numeric($start_year)) {
|
||||
$e = (int) date('Y') - (int) $start_year;
|
||||
if ($e > 0) {
|
||||
$t_exp = $e . ' ' . dekart_years_plural($e);
|
||||
}
|
||||
}
|
||||
|
||||
$name_parts = explode(' ', $t_name, 2);
|
||||
$name_first = $name_parts[0] ?? $t_name;
|
||||
$name_rest = $name_parts[1] ?? '';
|
||||
|
||||
$t_about_clean = $t_about ? wp_strip_all_tags($t_about) : '';
|
||||
if (mb_strlen($t_about_clean) > 150) {
|
||||
$t_about_clean = mb_substr($t_about_clean, 0, 150) . '…';
|
||||
}
|
||||
?>
|
||||
<div class="teachers-cards__item">
|
||||
<div class="teachers-cards__card">
|
||||
<div class="teachers-cards__card-top">
|
||||
<?php if ($t_photo) : ?>
|
||||
<?php $photo_url = wp_get_attachment_image_url($t_photo, array( 280, 280 )); ?>
|
||||
<img class="teachers-cards__photo" loading="lazy" width="140" height="140"
|
||||
src="<?php echo esc_url($photo_url ?: get_template_directory_uri() . '/assets/images/no-photo.png'); ?>"
|
||||
alt="<?php echo esc_attr($t_name); ?>">
|
||||
<?php else : ?>
|
||||
<img class="teachers-cards__photo" loading="lazy" width="140" height="140"
|
||||
src="<?php echo esc_url(get_template_directory_uri() . '/assets/images/no-photo.png'); ?>"
|
||||
alt="<?php echo esc_attr($t_name); ?>">
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="teachers-cards__card-body">
|
||||
<h3 class="teachers-cards__name">
|
||||
<?php echo esc_html($name_first); ?>
|
||||
<?php if ($name_rest) : ?>
|
||||
<br><?php echo esc_html($name_rest); ?>
|
||||
<?php endif; ?>
|
||||
</h3>
|
||||
<?php if ($t_subj) : ?>
|
||||
<p class="teachers-cards__subj"><?php echo esc_html($t_subj); ?></p>
|
||||
<?php endif; ?>
|
||||
<?php if ($t_about_clean) : ?>
|
||||
<p class="teachers-cards__desc"><?php echo esc_html($t_about_clean); ?></p>
|
||||
<?php endif; ?>
|
||||
<div class="teachers-cards__meta">
|
||||
<?php if ($t_badge) : ?>
|
||||
<span class="teachers-cards__meta-badge"><?php echo esc_html($t_badge); ?></span>
|
||||
<?php endif; ?>
|
||||
<?php if ($t_exp) : ?>
|
||||
<span class="teachers-cards__meta-exp"><svg aria-hidden="true" width="14" height="14" class="teachers-cards__meta-icon"><use href="<?php echo esc_url(dekart_icons_sprite_url()); ?>#icon-calendar"/></svg> Стаж: <?php echo esc_html($t_exp); ?></span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<button class="teachers-cards__btn open-bitrix-form">Записаться к этому педагогу</button>
|
||||
</div>
|
||||
<a class="teachers-cards__card-link" href="<?php echo esc_url(get_permalink($t_id)); ?>" aria-label="<?php echo esc_attr('Страница преподавателя: ' . $t_name); ?>"></a>
|
||||
</div>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
<?php wp_reset_postdata(); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="teachers-cards__grid">
|
||||
<?php if ($teachers_query->have_posts()) : ?>
|
||||
<?php while ($teachers_query->have_posts()) : $teachers_query->the_post(); ?>
|
||||
<?php get_template_part('template-parts/teachers/card', null, array( 'id' => get_the_ID() )); ?>
|
||||
<?php endwhile; ?>
|
||||
<?php wp_reset_postdata(); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="teachers-cards__footer">
|
||||
|
||||
99
wp-content/themes/dekart/template-parts/teachers/card.php
Normal file
99
wp-content/themes/dekart/template-parts/teachers/card.php
Normal file
@ -0,0 +1,99 @@
|
||||
<?php
|
||||
|
||||
// Карточка преподавателя — общий шаблон
|
||||
|
||||
if (! defined('ABSPATH')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$tid = isset($args['id']) ? (int) $args['id'] : 0;
|
||||
if (! $tid) {
|
||||
return;
|
||||
}
|
||||
|
||||
$teacher_review_counts = function_exists('dekart_teacher_review_counts') ? dekart_teacher_review_counts() : array();
|
||||
$current_year = (int) current_time('Y');
|
||||
|
||||
$full_name = get_the_title($tid);
|
||||
$cat = carbon_get_post_meta($tid, 'teacher_category');
|
||||
$direction = carbon_get_post_meta($tid, 'teacher_direction');
|
||||
$badge = carbon_get_post_meta($tid, 'teacher_badge');
|
||||
$start_year = carbon_get_post_meta($tid, 'teacher_start_year');
|
||||
$rating = carbon_get_post_meta($tid, 'teacher_rating');
|
||||
$avatar_id = carbon_get_post_meta($tid, 'teacher_avatar');
|
||||
$avatar_url = $avatar_id ? wp_get_attachment_url($avatar_id) : '';
|
||||
$alt_text = $avatar_id ? get_post_meta($avatar_id, '_wp_attachment_image_alt', true) : $full_name;
|
||||
|
||||
$tenure = '';
|
||||
if ($start_year && absint($start_year) > 1900) {
|
||||
$tenure = max(0, (int) $current_year - (int) $start_year);
|
||||
}
|
||||
|
||||
$cat_filter = ! empty($cat) ? $cat : 'all';
|
||||
?>
|
||||
<article class="teachers-card reveal" data-category="<?php echo esc_attr($cat_filter); ?>">
|
||||
<div class="teachers-card__media">
|
||||
<?php if ($avatar_url) : ?>
|
||||
<img class="teachers-card__photo" loading="lazy" decoding="async"
|
||||
src="<?php echo esc_url($avatar_url); ?>"
|
||||
alt="<?php echo esc_attr($alt_text); ?>"
|
||||
width="480" height="480">
|
||||
<?php endif; ?>
|
||||
<?php if ($badge) : ?>
|
||||
<span class="teachers-card__badge"><?php echo esc_html($badge); ?></span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="teachers-card__body">
|
||||
<h3 class="teachers-card__name"><?php echo esc_html($full_name); ?></h3>
|
||||
|
||||
<?php if ($direction) : ?>
|
||||
<div class="teachers-card__direction"><?php echo esc_html($direction); ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $t_desc = trim((string) carbon_get_post_meta($tid, 'teacher_description')); ?>
|
||||
<?php if ($t_desc !== '') : ?>
|
||||
<p class="teachers-card__about"><?php echo esc_html(wp_strip_all_tags($t_desc)); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($tenure) : ?>
|
||||
<div class="teachers-card__tenure">Стаж: <strong><?php echo esc_html($tenure); ?></strong> лет</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $rating_num = (float) $rating; ?>
|
||||
<?php if ($rating_num > 0) : ?>
|
||||
<div class="teachers-card__rating" aria-label="Оценка: <?php echo esc_attr($rating_num); ?> из 5">
|
||||
<span class="teachers-card__stars" aria-hidden="true">
|
||||
<?php for ($s = 1; $s <= 5; $s++) : ?>
|
||||
<svg class="teachers-card__star<?php echo $s <= round($rating_num) ? ' is-filled' : ''; ?>" width="16" height="16" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path d="M10 1l2.39 4.84 5.34.78-3.87 3.77.92 5.34L10 13.27l-4.78 2.51.92-5.34L2.27 6.6l5.34-.78L10 1z"/></svg>
|
||||
<?php endfor; ?>
|
||||
</span>
|
||||
<span class="teachers-card__rating-num"><?php echo esc_html(rtrim(rtrim(number_format($rating_num, 1), '0'), '.')); ?></span>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="teachers-card__actions">
|
||||
<?php $teacher_rc = isset($teacher_review_counts[ $tid ]) ? (int) $teacher_review_counts[ $tid ] : 0; ?>
|
||||
<?php if ($teacher_rc > 0) :
|
||||
$rc_mod10 = $teacher_rc % 10;
|
||||
$rc_mod100 = $teacher_rc % 100;
|
||||
if ($rc_mod10 === 1 && $rc_mod100 !== 11) {
|
||||
$rc_word = 'отзыв';
|
||||
} elseif ($rc_mod10 >= 2 && $rc_mod10 <= 4 && ( $rc_mod100 < 12 || $rc_mod100 > 14 )) {
|
||||
$rc_word = 'отзыва';
|
||||
} else {
|
||||
$rc_word = 'отзывов';
|
||||
} ?>
|
||||
<a class="teachers-card__reviews" href="<?php echo esc_url(get_permalink($tid)); ?>">
|
||||
<?php echo esc_html($teacher_rc . ' ' . $rc_word); ?> →
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<a class="teachers-card__btn btn-write open-bitrix-form" href="#" onclick="return false;">
|
||||
Записаться к преподавателю
|
||||
</a>
|
||||
<a class="teachers-card__link" href="<?php echo esc_url(get_permalink($tid)); ?>">
|
||||
Подробнее о преподавателе →
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
@ -1,124 +1,32 @@
|
||||
<?php
|
||||
|
||||
// Карточки преподавателей
|
||||
// Секция «Наши преподаватели» (страница /our-teachers/)
|
||||
|
||||
if (! defined('ABSPATH')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$teachers_args = array(
|
||||
'posts_per_page' => -1,
|
||||
'orderby' => 'date',
|
||||
'order' => 'ASC',
|
||||
'post_type' => 'teacher',
|
||||
'post_status' => 'publish',
|
||||
'no_found_rows' => true,
|
||||
$teachers_list = get_posts(array(
|
||||
'posts_per_page' => -1,
|
||||
'orderby' => 'date',
|
||||
'order' => 'ASC',
|
||||
'post_type' => 'teacher',
|
||||
'post_status' => 'publish',
|
||||
'no_found_rows' => true,
|
||||
'update_post_meta_cache' => true,
|
||||
'update_post_term_cache' => true,
|
||||
);
|
||||
));
|
||||
|
||||
$teachers_list = get_posts($teachers_args);
|
||||
if (empty($teachers_list)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Отзывы преподавателей
|
||||
$teacher_review_counts = function_exists('dekart_teacher_review_counts') ? dekart_teacher_review_counts() : array();
|
||||
|
||||
$current_year = (int) current_time('Y');
|
||||
?>
|
||||
<section class="teachers-cards section-bg reveal" data-bg="teachers-cards" aria-label="Преподаватели школы">
|
||||
<div class="container">
|
||||
<div class="teachers-cards__grid" id="teachers-grid">
|
||||
<?php foreach ($teachers_list as $teacher) :
|
||||
setup_postdata($teacher);
|
||||
|
||||
$tid = (int) $teacher->ID;
|
||||
$full_name = get_the_title($tid);
|
||||
$cat = carbon_get_post_meta($tid, 'teacher_category');
|
||||
$direction = carbon_get_post_meta($tid, 'teacher_direction');
|
||||
$badge = carbon_get_post_meta($tid, 'teacher_badge');
|
||||
$start_year = carbon_get_post_meta($tid, 'teacher_start_year');
|
||||
$rating = carbon_get_post_meta($tid, 'teacher_rating');
|
||||
$avatar_id = carbon_get_post_meta($tid, 'teacher_avatar');
|
||||
$avatar_url = $avatar_id ? wp_get_attachment_url($avatar_id) : '';
|
||||
$alt_text = $avatar_id ? get_post_meta($avatar_id, '_wp_attachment_image_alt', true) : $full_name;
|
||||
|
||||
$tenure = '';
|
||||
if ($start_year && absint($start_year) > 1900) {
|
||||
$tenure = max(0, (int) $current_year - (int) $start_year);
|
||||
}
|
||||
|
||||
$cat_filter = ! empty($cat) ? $cat : 'all';
|
||||
?>
|
||||
<article class="teachers-card reveal" data-category="<?php echo esc_attr($cat_filter); ?>">
|
||||
<div class="teachers-card__media">
|
||||
<?php if ($avatar_url) : ?>
|
||||
<img class="teachers-card__photo" loading="lazy" decoding="async"
|
||||
src="<?php echo esc_url($avatar_url); ?>"
|
||||
alt="<?php echo esc_attr($alt_text); ?>"
|
||||
width="480" height="480">
|
||||
<?php endif; ?>
|
||||
<?php if ($badge) : ?>
|
||||
<span class="teachers-card__badge"><?php echo esc_html($badge); ?></span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="teachers-card__body">
|
||||
<h3 class="teachers-card__name"><?php echo esc_html($full_name); ?></h3>
|
||||
|
||||
<?php if ($direction) : ?>
|
||||
<div class="teachers-card__direction"><?php echo esc_html($direction); ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $t_desc = trim((string) carbon_get_post_meta($tid, 'teacher_description')); ?>
|
||||
<?php if ($t_desc !== '') : ?>
|
||||
<p class="teachers-card__about"><?php echo esc_html(wp_strip_all_tags($t_desc)); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($tenure) : ?>
|
||||
<div class="teachers-card__tenure">Стаж: <strong><?php echo esc_html($tenure); ?></strong> лет</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $rating_num = (float) $rating; ?>
|
||||
<?php if ($rating_num > 0) : ?>
|
||||
<div class="teachers-card__rating" aria-label="Оценка: <?php echo esc_attr($rating_num); ?> из 5">
|
||||
<span class="teachers-card__stars" aria-hidden="true">
|
||||
<?php for ($s = 1; $s <= 5; $s++) : ?>
|
||||
<svg class="teachers-card__star<?php echo $s <= round($rating_num) ? ' is-filled' : ''; ?>" width="16" height="16" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path d="M10 1l2.39 4.84 5.34.78-3.87 3.77.92 5.34L10 13.27l-4.78 2.51.92-5.34L2.27 6.6l5.34-.78L10 1z"/></svg>
|
||||
<?php endfor; ?>
|
||||
</span>
|
||||
<span class="teachers-card__rating-num"><?php echo esc_html(rtrim(rtrim(number_format($rating_num, 1), '0'), '.')); ?></span>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="teachers-card__actions">
|
||||
<?php $teacher_rc = isset($teacher_review_counts[ $tid ]) ? (int) $teacher_review_counts[ $tid ] : 0; ?>
|
||||
<?php if ($teacher_rc > 0) :
|
||||
$rc_mod10 = $teacher_rc % 10;
|
||||
$rc_mod100 = $teacher_rc % 100;
|
||||
if ($rc_mod10 === 1 && $rc_mod100 !== 11) {
|
||||
$rc_word = 'отзыв';
|
||||
} elseif ($rc_mod10 >= 2 && $rc_mod10 <= 4 && ( $rc_mod100 < 12 || $rc_mod100 > 14 )) {
|
||||
$rc_word = 'отзыва';
|
||||
} else {
|
||||
$rc_word = 'отзывов';
|
||||
} ?>
|
||||
<a class="teachers-card__reviews" href="<?php echo esc_url(get_permalink($tid)); ?>">
|
||||
<?php echo esc_html($teacher_rc . ' ' . $rc_word); ?> →
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<a class="teachers-card__btn btn-write open-bitrix-form" href="#" onclick="return false;">
|
||||
Записаться к преподавателю
|
||||
</a>
|
||||
<a class="teachers-card__link" href="<?php echo esc_url(get_permalink($tid)); ?>">
|
||||
Подробнее о преподавателе →
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
<?php endforeach;
|
||||
wp_reset_postdata(); ?>
|
||||
get_template_part('template-parts/teachers/card', null, array( 'id' => (int) $teacher->ID ));
|
||||
endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user