/
index.php
73 lines (70 loc) · 2.91 KB
/
index.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
68
69
70
71
72
73
<?php
get_header();
?>
<section id="title" class="title">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="pagetitle">
<h1><?php echo get_bloginfo('name'); ?></h1>
<h5><?php echo get_bloginfo('description'); ?></h5>
</div>
</div>
</div>
</div>
</section>
<section id="content">
<div class="container">
<div class="col-md-9 col-sm-8">
<div class="content">
<?php
if ( have_posts() ) : while ( have_posts() ) : the_post();
$categories = get_the_category();
$cats='<ul>';
if($categories){
foreach($categories as $category) {
$cats .= '<li><a href="'.get_category_link( $category->term_id ).'" title="' . esc_attr( sprintf( __( "View all posts in %s" ,"vibe" ), $category->cat_name ) ) . '">'.$category->cat_name.'</a></li>';
}
}
$cats .='</ul>';
echo ' <div class="blogpost">
<div class="meta">
<div class="date">
<p class="day"><span>'.sprintf('%02d', get_the_time('j')).'</span></p>
<p class="month">'.get_the_time('M').'\''.get_the_time('y').'</p>
</div>
</div>
'.(has_post_thumbnail(get_the_ID())?'
<div class="featured">
<a href="'.get_permalink().'">'.get_the_post_thumbnail(get_the_ID(),'full').'</a>
</div>':'').'
<div class="excerpt '.(has_post_thumbnail(get_the_ID())?'thumb':'').'">
<h3><a href="'.get_permalink().'">'.get_the_title().'</a></h3>
<div class="cats">
'.$cats.'
<p>|
<a href="'.get_author_posts_url( get_the_author_meta( 'ID' ) ).'">'.get_the_author_meta( 'display_name' ).'</a>
</p>
</div>
<p>'.get_the_excerpt().'</p>
<a href="'.get_permalink().'" class="link">Read More</a>
</div>
</div>';
endwhile;
endif;
pagination();
?>
</div>
</div>
<div class="col-md-3 col-sm-4">
<div class="sidebar">
<?php
if ( !function_exists('dynamic_sidebar')|| !dynamic_sidebar('mainsidebar') ) : ?>
<?php endif; ?>
</div>
</div>
</div>
</section>
<?php
get_footer();
?>