Initial commit

This commit is contained in:
2024-03-01 17:47:03 +03:00
commit 10722da013
227 changed files with 13356 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
<div class="law">
<h3 class="subtitle-20 right-title">Законодательство</h3>
<div class="content-right__links">
<?php
$args = array(
'category_name' => 'zakonodatelstvo', // Slug категории
'posts_per_page' => 3, // Количество постов
'orderby' => 'date', // Сортировка по дате
'order' => 'DESC' // В порядке убывания (самые свежие)
);
$legislation_posts = new WP_Query($args);
if ($legislation_posts->have_posts()) {
while ($legislation_posts->have_posts()) {
$legislation_posts->the_post();
echo '<div class="doc">
<a href="' . get_permalink() . '" class="content-right__link-item link">' . get_the_title() . '</a>
</div>';
}
wp_reset_postdata();
} else {
echo '<p>Посты в категории "законодательство" не найдены.</p>';
}
?>
</div>
</div>