add menus

This commit is contained in:
2021-09-18 01:30:09 +03:00
parent 5a50fb1a94
commit d9c6a87cfe
11 changed files with 350 additions and 29 deletions

View File

@@ -6,8 +6,39 @@
get_header(); ?>
<div id="main">
<?php get_template_part('content') ?>
<?php $query = new WP_Query(
array('category__not_in' => array(2, 18 ,44)
)); # фильтруем рубрики
?>
<div id="content">
<h1 class="my-4">Главное</h1>
<?php if($query->have_posts()) : while($query->have_posts()) : $query->the_post();?>
<div class="card mb-4">
<a href="<?the_permalink();?>"><img class="card-img-top" src="<?php echo get_the_post_thumbnail_url(null, 'full'); ?>" alt="<?the_title();?>"></a>
<h2 class="card-title"><a href="<?the_permalink();?>"><?the_title();?></a></h2>
<div class="card-body">
<p class="card-text"><a href="<?the_permalink();?>"><?the_excerpt();?></a></p>
<div class="news_date"><?the_time('j F Y, G:i');?></div>
</div>
</div>
<?php endwhile;?>
</div>
<?php endif;?>
</div>