delete prefix category

This commit is contained in:
2024-05-29 10:19:39 +03:00
parent ed1a9bcb7b
commit 7282dfb814
8 changed files with 141 additions and 15 deletions

View File

@@ -30,9 +30,27 @@
</div>
<div id="fulltext">
<?// Получаем значение метаполя "completed" для текущей записи
$post_id = get_the_ID();
if ( metadata_exists( 'post', $post_id, 'completed' ) ) {
$completed = get_post_meta($post_id, 'completed', true);
} else {
$completed = false;
}
// Проверяем, установлена ли галочка "Завершено"
if ($completed === 'yes') {
echo '<h1 class="post-h1">'.get_the_title().'</h1>
<p>Мероприятие завершено. Посмотрите <span class="post_link_category"><a href="/category/vystavki-i-konferenitsii">актуальные мероприятия</a></span> или воспользуйтесь нашим поиском.</p>';
} else { ?>
<h1 class="post-h1"><?php wp_title('');?></h1>
<?$author = get_the_author();
if ( ! empty ( $author ) AND $author !== 'vetandlife.ru'):?>
<div class="post_author">
Автор: <?php the_author(); ?>
@@ -48,6 +66,9 @@
<!--<p><small class="text-muted"><?php the_tags('');?></small></p> -->
<?//endwhile;?>
<?}?>
</div>
<?php include get_template_directory().'/blocks/moread_events.php';?>
@@ -69,7 +90,7 @@
<div class="publ-to-main"><a href="https://vetandlife.ru"> <span class="arrow-go-main"><</span>&nbsp;&nbsp;&nbsp;<span class="go-to-main">На главную</span></a></div>
</div>