add fa
This commit is contained in:
48
index.php
48
index.php
@@ -4,10 +4,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
get_header();
|
||||
$nn = 0;?>
|
||||
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
<?php $query = new WP_Query(
|
||||
@@ -20,26 +19,51 @@ get_header(); ?>
|
||||
<h1 class="my-4">Главное</h1>
|
||||
|
||||
<?php if($query->have_posts()) : while($query->have_posts()) : $query->the_post();?>
|
||||
|
||||
<?$nn++;?>
|
||||
|
||||
<?if ($nn == 1):?>
|
||||
|
||||
<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 class="main-card">
|
||||
|
||||
<?if ( has_post_thumbnail() ) :?>
|
||||
<a href="<?the_permalink();?>"><img class="card-img-top" src="<?php echo get_the_post_thumbnail_url(null, 'full'); ?>" alt="<?the_title();?>"></a>
|
||||
<?endif?>
|
||||
|
||||
<h2 class="main-card-title"><a href="<?the_permalink();?>"><?the_title();?></a></h2>
|
||||
<div class="main-card-body">
|
||||
<div class="main-card-text"><a href="<?the_permalink();?>"><?the_excerpt();?></a></div>
|
||||
<div class="news_date"><?the_time('j F Y, G:i');?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?elseif ($nn == 2):?>
|
||||
<div class="mini-card-block">
|
||||
<?endif?>
|
||||
|
||||
<?if ($nn > 1):?>
|
||||
|
||||
<div class="mini-card">
|
||||
<?if ( has_post_thumbnail() ) :?>
|
||||
<a href="<?the_permalink();?>"><img class="mini-card-img" src="<?php echo get_the_post_thumbnail_url(null, 'full'); ?>" alt="<?the_title();?>"></a>
|
||||
<?endif?>
|
||||
<h2 class="mini-card-title"><a href="<?the_permalink();?>"><?the_title();?></a></h2>
|
||||
<div class="mini-card-body">
|
||||
<div class="news_date"><?the_time('j F Y, G:i');?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?endif?>
|
||||
|
||||
<?php endwhile;?>
|
||||
|
||||
</div>
|
||||
</div> <!--//end minicard block -->
|
||||
|
||||
|
||||
<?php endif;?>
|
||||
|
||||
|
||||
</div>
|
||||
</div> <!-- end content -->
|
||||
|
||||
|
||||
<?php get_footer(); ?>
|
||||
Reference in New Issue
Block a user