-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharchive.php
executable file
·83 lines (62 loc) · 2.48 KB
/
archive.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
80
81
82
83
<?php
/**
* @package WordPress
* @subpackage Lib-Tech-WordPress-Theme
*/
get_header(); ?>
<section class="blog-posts container-fluid">
<div class="section-content row">
<?php if (have_posts()) : ?>
<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
<?php /* If this is a category archive */ if (is_category()) { ?>
<h2 class="col-xs-12">Articles for <?php single_cat_title(); ?></h2>
<?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
<h2 class="col-xs-12">Posts Tagged <?php single_tag_title(); ?></h2>
<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
<h2 class="col-xs-12">Articles for <?php the_time('F jS, Y'); ?></h2>
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
<h2 class="col-xs-12">Articles for <?php the_time('F, Y'); ?></h2>
<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
<h2 class="pagetitle col-xs-12">Articles for <?php the_time('Y'); ?></h2>
<?php /* If this is an author archive */ } elseif (is_author()) { ?>
<h2 class="pagetitle col-xs-12">Author Articles</h2>
<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
<h2 class="pagetitle col-xs-12">Blog Articles</h2>
<?php } ?>
<ul>
<?php
$i = 1;
while (have_posts()) : the_post();
$postImage = get_post_image('rect-medium');
?>
<div <?php post_class('blog-post col-xs-12 col-ms-12 col-sm-4'); ?> id="post-<?php the_ID(); ?>">
<div class="post-wrapper clearfix">
<a href="<?php the_permalink() ?>">
<div class="post-image-wrapper col-ms-4 col-sm-12">
<img src="<?php echo $postImage[0]; ?>" alt="Image From <?php echo get_the_title(); ?>" />
</div>
<div class="post-text-wrapper col-ms-8 col-sm-12">
<p class="post-meta">
<time datetime="<?php the_time('c') ?>"><?php the_time('F jS, Y') ?></time>
</p>
<h3 class="post-title"><?php the_title(); ?></h3>
</div>
</a>
</div>
</div>
<?php
if($i %3 == 0) echo '<div class="clearfix visible-sm visible-md visible-lg"></div>';
$i++;
endwhile; ?>
</ul>
<?php post_navigation(); ?>
<?php else : ?>
<h2>Nothing Found</h2>
<?php endif; ?>
</div><!-- END .section-content -->
<div class="clearfix"></div>
</section><!-- END .homepage-posts -->
<!--
<?php get_sidebar(); ?>
-->
<?php get_footer(); ?>