-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
45 lines (45 loc) · 1.58 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
<?php get_header(); ?>
<div id="main">
<div id="content" class="container">
<!-- index.php -->
<div class="row">
<div class="col-sm-8">
<header><h1><?php the_title(); ?></h1></header>
<?php if (function_exists('dimox_breadcrumbs')) dimox_breadcrumbs(); ?>
</div>
<div class="col-sm-4">
<div class="header-search"><?php get_search_form(); ?></div>
</div>
</div>
<div class="row">
<div class="col-sm-3">
<?php get_sidebar(); ?>
</div>
<div class="col-sm-9">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php
$categories = get_the_category();
$separator = ', ';
$output = '';
if($categories){
foreach($categories as $category) {
$output .= '<a href="'.get_category_link( $category->term_id ).'" title="'.esc_attr( sprintf( __( "View all posts in %s" ), $category->name)).'">'.$category->cat_name.'</a>'.$separator;
}
}
?>
<article>
<header>
<h3><a href="<?php echo get_permalink(); ?>"><?php echo get_the_title(); ?></a></h3>
<span class="news-post-category"><?php echo trim($output, $separator).' - '.get_the_time('F jS, Y'); ?></span>
</header>
<p><?php the_post_thumbnail( ); ?></p>
<p><?php the_content(__('(more...)')); ?></p>
<p><?php comments_template( $file, $separate_comments ); ?></p>
</article>
<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p><?php endif; ?>
</div>
</div>
</div>
</div>
<?php get_footer(); ?>