-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharchive-geo_project.php
55 lines (55 loc) · 2.32 KB
/
archive-geo_project.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
<?php get_header(); ?>
<div class="col-md-5" id="topNavLinks">
<span class="navLink">← <a href="<?php bloginfo('url'); ?>" title="go back to the home page of our site">home</a></span>
</div>
</div><!-- contactNav -->
</div><!-- .row -->
<div class="row">
<div class="col-md-12">
<h1>projects</h1>
</div>
<!-- query adapted from diceone http://wordpress.org/support/topic/297090#post-1186292 and http://wordpress.org/support/topic/adding-a-different-class-to-every-third-post -->
<?php
query_posts('post_type=geo_project&orderby=date&order=DESC&posts_per_page=-1');
if ( have_posts() ) :
while (have_posts()) : the_post();
?>
<div class="col-xs-6 col-sm-3 projectCard">
<?php
$excerpt = strip_tags(get_the_excerpt());
$excerpt = $excerpt . ' Click for more info.';
$img_args = array(
'title' => $excerpt,
'class' => 'img-responsive'
);
?>
<a href="<?php the_permalink(); ?>">
<?php
if ( has_post_thumbnail() ) {
the_post_thumbnail( 'project-thumbnail', $img_args);
}
?>
</a>
<div class="projectCardTitle">
<a href="<?php the_permalink(); ?>" title="<?php echo $excerpt ?>">
<?php the_title(); ?>
</a>
</div>
</div>
<?php
endwhile;
else :
?>
<p>No projects.</p>
<?php
endif;
wp_reset_query();
?>
</div>
<div class="row">
<div class="grid_12 navLinks">
<span class="navLink">← <a href="<?php bloginfo('url'); ?>" title="go back to the home page of our site">home</a></span>
<span class="navLink"><a href="#top" title="jump back to the top of this page">top</a> ↑</span>
</div>
</div>
<?php get_footer(); ?>