forked from interglobalvision/niceshirtfilms-com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpage-about.php
executable file
·82 lines (59 loc) · 1.28 KB
/
page-about.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
<?php
get_header();
?>
<!-- main content -->
<main id="main-content">
<?php
if( have_posts() ) {
while( have_posts() ) {
the_post();
$meta = get_post_meta($post->ID);
?>
<article id="page" <?php post_class(); ?>>
<header class="page-header u-cf">
<div class="col col2 colpad1left">
<h3><?php the_title(); ?></h3>
</div>
</header>
<section class="row u-cf">
<div class="col col1 cf">
<?php
if (!empty($meta['_igv_gif'][0])) {
?>
<img src="<?php echo $meta['_igv_gif'][0]; ?>" />
<?php
} else {
$directors = get_posts('post_type=director&posts_per_page=-1&orderby=rand');
foreach ($directors as $post) {
$img = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'width-250');
?>
<div class="about-page-director">
<a href="<?php echo get_the_permalink($post->ID); ?>">
<img src="<?php echo $img[0]; ?>" />
</a>
</div>
<?php
}
}
?>
</div>
<div class="col col2">
<div class="copy">
<?php the_content(); ?>
</div>
</div>
</article>
<?php
}
} else {
?>
<section class="error">
<article class="u-alert"><?php _e('Sorry, nothing matched your criteria :{'); ?></article>
</section>
<?php
} ?>
<!-- end main-content -->
</main>
<?php
get_footer();
?>