add folder EN
This commit is contained in:
28
en/latest-legislation-posts-en.php
Normal file
28
en/latest-legislation-posts-en.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<div class="law">
|
||||
<h3 class="subtitle-20 right-title">Regulation</h3>
|
||||
<div class="content-right__links">
|
||||
<?php
|
||||
$args = array(
|
||||
'category_name' => 'regulation', // 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>
|
||||
Reference in New Issue
Block a user