add cookies

This commit is contained in:
2026-01-09 18:13:48 +03:00
parent a1393e8b13
commit 64a4db8d8e
6 changed files with 41 additions and 20 deletions

View File

@@ -4,12 +4,13 @@
<div class="maintitle">
<h1><?php single_cat_title(); ?></h1>
<div class="h-telega"><a href="https://t.me/sportpressa" target="_blank">@sportpressa</a></div>
<?php if (category_description()) : ?>
<div class="category-description">
<?php echo category_description(); ?>
</div>
<?php endif; ?>
</div>
<?php if (category_description() && !is_paged()) : ?>
<div class="category-description">
<?php echo category_description(); ?>
</div>
<?php endif; ?>
<?php get_template_part('template-parts/content', 'cards'); ?>
@@ -25,3 +26,4 @@
<?php get_sidebar(); ?>
<?php get_footer(); ?>

View File

@@ -5,6 +5,8 @@
<?php wp_footer(); ?>
<?php get_template_part( 'template-parts/cookie-consent' ); ?>
<footer>
<a href="#top" class="to-top"><svg width="53" height="53" viewBox="0 0 53 53" fill="none" xmlns="http://www.w3.org/2000/svg"> <rect width="53" height="53" fill="#006842"></rect> <path d="M26.9091 24.1732L39.8181 31.6279L39.8181 24.4546L26.9091 16.9999L26.9091 24.1732Z" fill="#F18917"></path> <path d="M26.909 24.1732L14 31.6279L14 24.4546L26.909 16.9999L26.909 24.1732Z" fill="#F18917"></path> </svg></a>
<div class="footer-content">
@@ -16,6 +18,7 @@
</div>
<div class="rating">18+</div>
</div>
<?php get_template_part( 'template-parts/subscripts-promo' ); ?>
<div id="copyr">
© Сетевое издание Спортпресса, 2018 - <?=date('Y')?> (sportpressa.ru). Учредитель: Синьковский Петр Сергеевич. Главный редактор: Синьковский П.С. Электронный адрес: info@sportpressa.ru. Телефон редакции: +7(495)511-49-05. Свидетельство о регистрации ЭЛ № ФС 77 - 73274 от 13.07.2018 года. Выдано Федеральной службой по надзору в сфере связи, информационных технологий и массовых коммуникаций (Роскомнадзор). 2002-2024 SportPressa.ru™ Все права защищены.
</div>

View File

@@ -95,10 +95,7 @@
</div>
</noscript>
<!-- //Rating@Mail.ru counter -->
<!-------------------------------------------------------------------------------- Статусная строка -->
</head>
@@ -112,13 +109,14 @@
<div class="site-header-content">
<div class="sportpressa-logo">
<a href="<?php echo home_url()?>"><span class="redword">С</span>порт</a>
<img src="<?php echo home_url()?>/sportpressa.svg" width="40">
<img src="<?php echo home_url()?>/sportpressa.svg" width="30">
<a href="<?php echo home_url()?>">Пресса</a>
</div>
<button class="hamburger" id="mobile-menu-toggle" aria-label="Открыть меню">
<span class="hamburger-icon"></span>
</button>
<div class="mobile-menu-overlay">
<button class="mobile-menu-close" id="mobile-menu-close" aria-label="Закрыть меню">
@@ -135,6 +133,7 @@
) );
?>
</nav>
</div>
<nav class="desktop-nav">
@@ -147,6 +146,9 @@
) );
?>
</nav>
<?php //get_template_part( 'template-parts/subscripts-promo' ); ?>
</div>
</header>

13
tag.php
View File

@@ -2,14 +2,15 @@
<main class="main">
<div class="maintitle">
<h1>#<?php single_tag_title(); ?></h1>
<h1 class="hashtag-title"><?php single_tag_title(); ?></h1>
<div class="h-telega"><a href="https://t.me/sportpressa" target="_blank">@sportpressa</a></div>
<?php if (tag_description()) : ?>
<div class="tag-description">
<?php echo tag_description(); ?>
</div>
<?php endif; ?>
</div>
<?php if (tag_description() && !is_paged()) : ?>
<div class="category-description">
<?php echo tag_description(); ?>
</div>
<?php endif; ?>
<?php get_template_part('template-parts/content', 'cards'); ?>

View File

@@ -22,22 +22,33 @@ function render_full_category_breadcrumbs( $cat_id, &$position = 1, $separator =
$position++;
}
// Функция проверки принадлежности к рубрике Новости
function is_news_category( $cat_id ) {
$news_cat = get_category_by_slug( 'news' );
if ( ! $news_cat ) return false;
// Проверяем, является ли текущая категория "Новости" или её потомком
return ( $cat_id == $news_cat->term_id || cat_is_ancestor_of( $news_cat->term_id, $cat_id ) );
}
$categories = get_the_category();
if ( empty( $categories ) ) return;
$main_cat = $categories[0];
$breadcrumb_position = 1;
$show_datetime = is_news_category( $main_cat->term_id );
?>
<nav class="breadcrumbs" aria-label="Навигация по рубрикам" itemscope itemtype="https://schema.org/BreadcrumbList">
<ol class="breadcrumbs_list" itemprop="itemListElement">
<?php render_full_category_breadcrumbs( $main_cat->term_id, $breadcrumb_position ); ?>
<?php if ( $show_datetime ) : ?>
<li property="itemListElement" typeof="ListItem">
<span property="item" typeof="WebPage" itemprop="name"><?php the_time('j F Y, H:i \М\С\К'); ?></span>
<meta property="position" content="<?php echo ++$breadcrumb_position; ?>" />
</li>
<?php endif; ?>
</ol>
</nav>

View File

@@ -1,4 +1,6 @@
<div class="subscripts"> Подпишитесь на Спорт&nbsp;
<a class="btn_sub_social" href="https://dzen.ru/sportpressa.ru" target="_blank"> Дзен </a>
<a class="btn_sub_social" href="https://t.me/sportpressa" target="_blank">Telegram</a>
<div class="subscripts"> Читайте нас в&nbsp;
<a class="btn_sub_social" href="https://dzen.ru/sportpressa.ru" target="_blank">Дзен</a>
<a class="btn_sub_social" href="https://t.me/sportpressa" target="_blank">Телеграм</a>
<a class="btn_sub_social" href="https://vk.com/sportpressa" target="_blank">ВК</a>
<a class="btn_sub_social desc" href="https://ok.ru/sportpressa" target="_blank">ОК</a>
</div>