add menus
This commit is contained in:
33
index.php
33
index.php
@@ -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>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user