-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathindex.php
executable file
·79 lines (50 loc) · 1.54 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
74
75
76
77
78
79
<?php
/**
* @package WordPress
* @subpackage YOUR_THEME
*/
get_header(); ?>
<?php
get_sidebar(); ?>
<div class="content">
<?php
if (have_posts()) : ?>
<?php
$post_count = 1;
$row = 1;
while (have_posts()) : the_post();
$span = $post_count > 2 ? 4 : 8;
$row_count = array(
4 => 4,
8 => 2
);
if($row == 1){ echo '<div class="row">'; }
$end_row = $row == $row_count[$span] ? TRUE : FALSE; ?>
<div class="span<?php echo $span; ?>">
<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small>
<?php the_content('Read the rest of this entry »'); ?>
<p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>
</div>
</div> <!-- span -->
<?php
if($end_row){
echo '</div> <!-- row -->';
$row = 1;
}else{
$row++;
}
$post_count++;
endwhile; ?>
<?php bootstrap_pagination(); ?>
<?php
else : ?>
<h2 class="center">Not Found</h2>
<p class="center">Sorry, but you are looking for something that isn't here.</p>
<?php get_search_form(); ?>
<?php
endif; ?>
</div> <!-- content -->
<?php
get_footer(); ?>