2026-09-15 single-teacher.php
This commit is contained in:
parent
9028aef6ba
commit
91e8d18b43
@ -453,6 +453,9 @@
|
||||
font-size: 1.05rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
.teacher-single__edu-col:only-child {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
.teacher-single__edu-text {
|
||||
font-size: 0.9375rem;
|
||||
line-height: 1.7;
|
||||
|
||||
@ -609,6 +609,61 @@ $schema_graph[] = array('@type' => 'BreadcrumbList', 'itemListElement' => $bread
|
||||
</section>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
// ─────────────────── ОБРАЗОВАНИЕ / СЕРТИФИКАТЫ ───────────────────
|
||||
// Направления здесь не дублируем — они уже показаны ниже в секции «Программы и направления».
|
||||
$certificates = (array) carbon_get_post_meta($tid, 'certificates');
|
||||
if ($education || $add_education || ! empty($certificates)) :
|
||||
?>
|
||||
<section class="teacher-single__edu section-bg reveal" data-bg="teacher-edu" aria-labelledby="teacher-edu-title">
|
||||
<div class="container">
|
||||
<h2 id="teacher-edu-title" class="bento-h2">Образование и опыт</h2>
|
||||
<?php if ($education || $add_education) : ?>
|
||||
<div class="teacher-single__edu-grid">
|
||||
<?php if ($education) : ?>
|
||||
<div class="teacher-single__edu-col">
|
||||
<h3 class="teacher-single__edu-h">Образование</h3>
|
||||
<div class="teacher-single__edu-text"><?php echo wp_kses_post($education); ?></div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ($add_education) : ?>
|
||||
<div class="teacher-single__edu-col">
|
||||
<h3 class="teacher-single__edu-h">Повышение квалификации</h3>
|
||||
<div class="teacher-single__edu-text"><?php echo wp_kses_post($add_education); ?></div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ($certificates) : ?>
|
||||
<div class="teacher-single__cert-grid">
|
||||
<?php foreach ($certificates as $cert) :
|
||||
$c_id = $cert['certificates_foto'] ?? '';
|
||||
$c_alt = $c_id ? get_post_meta((int) $c_id, '_wp_attachment_image_alt', true) : '';
|
||||
// image() = проверка наличия + вывод, без отдельного url-запроса.
|
||||
$c_img = $c_id ? wp_get_attachment_image(
|
||||
(int) $c_id,
|
||||
'medium',
|
||||
false,
|
||||
array(
|
||||
'alt' => $c_alt ?: ('Диплом или сертификат — ' . $full_name),
|
||||
'loading' => 'lazy',
|
||||
'decoding' => 'async',
|
||||
)
|
||||
) : '';
|
||||
if (! $c_img) {
|
||||
continue;
|
||||
}
|
||||
?>
|
||||
<figure class="teacher-single__cert">
|
||||
<?php echo $c_img; ?>
|
||||
</figure>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</section>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (! empty($subject_items)) : ?>
|
||||
<?php
|
||||
// ─────────────────── ПРОГРАММЫ (H2-секция на курс) ───────────────────
|
||||
@ -861,59 +916,6 @@ $schema_graph[] = array('@type' => 'BreadcrumbList', 'itemListElement' => $bread
|
||||
</section>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
// ─────────────────── ОБРАЗОВАНИЕ / СЕРТИФИКАТЫ ───────────────────
|
||||
// Направления здесь не дублируем — они уже показаны выше в секции «Программы и направления».
|
||||
$certificates = (array) carbon_get_post_meta($tid, 'certificates');
|
||||
if ($education || $add_education || ! empty($certificates)) :
|
||||
?>
|
||||
<section class="teacher-single__edu section-bg reveal" data-bg="teacher-edu" aria-labelledby="teacher-edu-title">
|
||||
<div class="container">
|
||||
<h2 id="teacher-edu-title" class="bento-h2">Образование и опыт</h2>
|
||||
<div class="teacher-single__edu-grid">
|
||||
<?php if ($education || $add_education) : ?>
|
||||
<div class="teacher-single__edu-col">
|
||||
<?php if ($education) : ?>
|
||||
<h3 class="teacher-single__edu-h">Образование</h3>
|
||||
<div class="teacher-single__edu-text"><?php echo wp_kses_post($education); ?></div>
|
||||
<?php endif; ?>
|
||||
<?php if ($add_education) : ?>
|
||||
<h3 class="teacher-single__edu-h">Повышение квалификации</h3>
|
||||
<div class="teacher-single__edu-text"><?php echo wp_kses_post($add_education); ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php if ($certificates) : ?>
|
||||
<div class="teacher-single__cert-grid">
|
||||
<?php foreach ($certificates as $cert) :
|
||||
$c_id = $cert['certificates_foto'] ?? '';
|
||||
$c_alt = $c_id ? get_post_meta((int) $c_id, '_wp_attachment_image_alt', true) : '';
|
||||
// image() = проверка наличия + вывод, без отдельного url-запроса.
|
||||
$c_img = $c_id ? wp_get_attachment_image(
|
||||
(int) $c_id,
|
||||
'medium',
|
||||
false,
|
||||
array(
|
||||
'alt' => $c_alt ?: ('Диплом или сертификат — ' . $full_name),
|
||||
'loading' => 'lazy',
|
||||
'decoding' => 'async',
|
||||
)
|
||||
) : '';
|
||||
if (! $c_img) {
|
||||
continue;
|
||||
}
|
||||
?>
|
||||
<figure class="teacher-single__cert">
|
||||
<?php echo $c_img; ?>
|
||||
</figure>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</section>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
// ─────────────────── FAQ (формат + общие) ───────────────────
|
||||
if (! empty($faq_items)) :
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user