-
Notifications
You must be signed in to change notification settings - Fork 0
/
content.php
67 lines (52 loc) · 1.73 KB
/
content.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
65
66
67
<div class="row div-single-articles <?php if ( has_post_thumbnail() ) { ?>has-thumbnail <?php } ?>">
<div class="col-md-5">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('small-thumbnail'); ?></a>
</div>
<div class="col-md-7">
<div class="row">
<div class="col-md-10 col-sm-10 col-xs-8">
<h3 class="title-article"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<p class="author-article">by <a href="<?php echo get_author_posts_url(get_the_author_meta('ID')); ?>"><?php the_author(); ?></a></p>
<p class="comment-article"><i class="fa fa-comment-o"></i> 99 <i class="fa fa-tags"></i>
<?php
$categories = get_the_category();
$separator = ", ";
$output = '';
if ($categories) {
foreach ($categories as $category) {
$output .= '<a href="' . get_category_link($category->term_id) . '">' . $category->cat_name . '</a>' . $separator;
}
echo trim($output, $separator);
}
?></p>
</div>
<div class="col-md-2 col-sm-2 col-xs-4">
<div class="date-article">
<?php the_time('F Y'); ?>
</div>
</div>
</div>
<?php if ( is_search() OR is_archive() ) { ?>
<p>
<?php echo get_the_excerpt(); ?>
<div class="row">
<div class="col-md-12">
<a href="<?php the_permalink(); ?>" class="more-galery-feed">Read More</a>
</div>
</div>
</p>
<?php } else {
if ($post->post_excerpt) { ?>
<p>
<?php echo get_the_excerpt(); ?>
<div class="row">
<div class="col-md-12">
<a href="<?php the_permalink(); ?>" class="more-galery-feed">Read More</a>
</div>
</div>
<?php } else {
the_content();
}
} ?>
</div>
</div>