-
Notifications
You must be signed in to change notification settings - Fork 0
/
home.php
80 lines (57 loc) · 1.72 KB
/
home.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
<?php get_header(); ?>
<div class="container">
<!-- page content -->
<section class="page-wrap">
<?php include (TEMPLATEPATH . '/inc/loadoverlay.php' ); ?>
<div class="page-cont">
<!-- featured content -->
<?php
$args = array( 'post_type' => 'project', 'posts_per_page' => 100, 'order'=>'DESC', 'orderby'=> 'modified');
$my_query = new WP_Query( $args );
// See links provided by alchymyth for more info on query parameters
// What amount of posts/thumbnails (whatever) to show before closing the element and opening another
?>
<?php if( $my_query->have_posts() ) : ?>
<!-- open starting div before loop -->
<section id="hero" class="group" data-margin="60">
<?php while( $my_query->have_posts() ) : $my_query->the_post();?>
<?php
if( get_field('feature_this') && !isset($done)):
?>
<figure class="feat-img">
<?php
if(get_field('featured_image')):
$feature_image = get_field('featured_image');
else:
echo "no-image";
endif;
?>
<a class="internal" href="<?php the_permalink(); ?>">
<img src="<?php echo $feature_image['url']; ?>" alt="" />
</a>
</figure>
<aside class="feat-text">
<article class="summary">
<h2><?php the_title();?></h2>
<?php the_excerpt(); ?>
<a href="<?php the_permalink(); ?>" class="more-btn">More</a>
</article>
</aside>
<?php
$done = true;
else:
//nothing
endif;
?>
<?php endwhile; ?>
</section>
<?php
endif;
wp_reset_query();
?>
</div>
<!-- end page content -->
</section>
<?php include (TEMPLATEPATH . '/inc/projects.php' ); ?>
</div> <!-- end container -->
<?php get_footer(); ?>