php if have_posts php while have_posts the_post div class post-item dl

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="post-item">
<dl class="date">
<dt><?php echo get_the_time('j'); ?></dt>
<dd><?php echo to_roman(get_the_time('n')); ?> <?php echo get_the_time('Y'); ?></dd>
</dl>
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php the_tags('<div class="tags">','','</div>'); ?>
<div class="description">
<?php the_content(); ?>
<?php if (!is_single()): ?>
<div class="b-comments">
<span class="count-comments"><?php echo get_comments_number($post->ID); ?></span> <a class="l-comments" href="<?php the_permalink(); ?>"><span class="plus">+</span> <span>комментировать</span></a>
</div>
<?php endif ?>
</div>
</div>
<?php endwhile; ?>
<?php wp_link_pages(); ?>
<?php comments_template(); ?>
<?php else : ?>
<h3>Извините, ничего не найдено...</h3>
<?php endif; ?>