-
Notifications
You must be signed in to change notification settings - Fork 0
/
category.php
64 lines (46 loc) · 1.68 KB
/
category.php
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/**
* The template for displaying category pages.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package Starship
*/
get_header(); ?>
<div class="col-sm-8 blog-main">
<div class="blog-post">
<?php
// Check if there are any posts to display
if ( have_posts() ) : ?>
<header class="page-header">
<h1 class="page-title">Рубрикa: <?php single_cat_title( '', true ); ?></h1>
<?php
// Display optional category description
if ( category_description() ) : ?>
<div class="archive-meta"><?php echo category_description(); ?></div>
<?php endif; ?>
</header>
<?php
// The Loop
while ( have_posts() ) : the_post(); ?>
<h2 class="blog-post-title-home"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<p class="blog-post-meta blog-post-meta-bottom"><?php the_time('j F Y') ?> <span class="glyphicon glyphicon-eye-open" aria-hidden="true"></span> <span><?php
if(function_exists('get_post_views')) {
echo get_post_total_views();
}
?></span> <?php echo "Рубрика: "; the_category (' '); //Пустые кавычки убирают теги <ul> ?><!--by--> <?php/* the_author_posts_link()*/ ?></p>
<div class="entry-category">
<?php the_content(); ?>
<!--<p class="postmetadata"><?php /*
comments_popup_link( 'No comments yet', '1 comment', '% comments', 'comments-link', 'Comments closed');*/
?></p>-->
</div>
<?php endwhile;
else: ?>
<p>Sorry, no posts matched your criteria.</p>
<?php endif; ?>
<?php wp_pagination(); ?>
</div><!-- /.blog-post -->
</div><!-- /.blog-main -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>