forked from openknowledge-archive/wordpress-theme-with-bp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontent-blog.php
More file actions
29 lines (26 loc) · 793 Bytes
/
content-blog.php
File metadata and controls
29 lines (26 loc) · 793 Bytes
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
<?php
/**
* @package OKFNWP
*/
$categories = get_the_category();
?>
<div class="col-md-6 post--blog post--excerpt">
<?php
if(has_post_thumbnail()) :
?>
<div class="post__thumb">
<?php
echo '<a href="' . get_permalink() . '">' . get_the_post_thumbnail() . '</a>';
if($categories) :
echo sprintf('<a href="%1$s" class="post__category">%2$s</a>', get_category_link($categories[0]->term_id), $categories[0]->name);
endif;
?>
</div>
<?php
endif;
?>
<h4><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4>
<p class="post__meta"><i class="fa fa-calendar"></i> <?php echo sprintf(__('Posted %1$s'), get_the_time('jS F Y')); ?></p>
<?php the_excerpt(); ?>
<a href="<?php the_permalink(); ?>"><?php _e('Read more'); ?></a>
</div>