-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
64 lines (44 loc) · 1.43 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
<?php
get_header();
?>
<div class="container">
<?php
// query_posts(array('category_name' => 'blog-post'));
if (have_posts()) :
while (have_posts()) : the_post();
// Post content box size relative to post size tag (bad hack)
$post_size = "";
if (has_tag("short")) {
$post_size = "short";
} else if (has_tag("medium")) {
$post_size = "medium";
} else if (has_tag("long")) {
$post_size = "long";
};
?>
<article class="post <?php echo $post_size ?>">
<p class="post-info"><?php the_time('F j Y'); ?></p>
<h2 class="post-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php the_post_thumbnail('small-thumbnail'); ?>
<?php if ($post->post_excerpt) { ?>
<p class="post-content">
<?php echo get_the_excerpt(); ?>
<a href="<?php the_permalink(); ?>">Read more»</a>
</p>
<?php } else {
the_excerpt(); ?>
<a href="<?php the_permalink(); ?>"><h6>Read More! »<h6></a>
<?php } ?>
</article>
<?php endwhile; ?>
<div class="prev-next-container">
<h3>
<span class="next"><?php next_posts_link('« Older Entries') ?></span>
<span class="prev"><?php previous_posts_link('Newer Entries »') ?></span>
</h3>
</div>
<?php else :
echo '<p>No content found</p>';
endif;
get_footer();
?>