-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpage-cosplay.php
63 lines (44 loc) · 1.53 KB
/
page-cosplay.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
<?php
/*
Template Name: Cosplay Grid Template
*/
?>
<?php get_header(); ?>
<div class="container">
<div class="row">
<div class="col-md-12">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<!-- <div class="page-header">
<h1><?php the_title(); ?></h1>
</div> -->
<?php endwhile; else: ?>
<div class="page-header">
<h1>Oh No!</h1>
</div>
<p>No content is appearing for this page, bummer.</p>
<?php endif; ?>
</div>
</div>
<div class="row push">
<?php
$args = array(
'post_type'=>'cosplay'
);
$the_query = new WP_Query($args);
?>
<?php if (have_posts()) : while($the_query->have_posts()) : $the_query->the_post();?>
<div class="col-md-4 portfolio-piece cosplay">
<?php
$thumbnail_id = get_post_thumbnail_id();
$thumbnail_url = wp_get_attachment_image_src($thumbnail_id, 'thumnail-size', true);
?>
<a href="<?php the_permalink(); ?>"><img src="<?php echo $thumbnail_url[0]; ?>" alt="<?php the_title(); ?> graphic"><span class='blue-overlay'><h3><?php the_title(); ?></h3></span></a>
</div>
<?php $portfolio_count = $the_query->current_post + 1; ?>
<?php if ($portfolio_count % 3 == 0): ?>
</div>
<div class="row">
<?php endif; ?>
<?php endwhile; endif; ?>
</div>
<?php get_footer(); ?>