-
Notifications
You must be signed in to change notification settings - Fork 0
/
page-games.php
56 lines (50 loc) · 1.44 KB
/
page-games.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
<?php
/*
Template Name: Games Page
*/
?>
<?php get_header(); ?>
<section id="main_section">
<section id="games_intro" class="grey_plate">
<?php while (have_posts()) : the_post(); ?>
<?php the_content(); ?>
<?php endwhile; ?>
</section><!-- #games_intro -->
<section id="feature_spots">
<?php
$args = array(
'post_type' => 'game',
// 'tag' => 'current-projects',
//use tag__not_in to handle posts that are tagged slider and feature
//slider cat id is 33
//'tag__not_in' => array(33),
);
$loop = new WP_Query($args);
$count = 1;
while ( $loop->have_posts() ) : $loop->the_post();
if($count%3==0){ ?>
<article class="featured_article last">
<?php } else { ?>
<article class="featured_article">
<?php } ?>
<a href="<?php the_permalink() ?>">
<?php the_post_thumbnail('featured'); ?>
</a>
<div class="featured_article_text">
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
<?php the_title( '<h3>', '</h3>' ); ?>
</a>
<p>
<?php
$short_description->the_field('description');
$short_description->the_value();
?>
</p>
</div>
</article>
<?php
$count ++;
endwhile; ?>
</section><!-- feature_spots -->
</section><!-- main_section -->
<?php get_footer(); ?>