-
Notifications
You must be signed in to change notification settings - Fork 1
/
ignition.php
executable file
·76 lines (57 loc) · 2.09 KB
/
ignition.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
<?php
/*
Template Name: ignition_page
*/
?>
<?php
function get_people($grouptag) {
if ($pages = get_pages( array('meta_key' => 'is_'.$grouptag, 'child_of' => get_the_ID()) )) {
echo '<div class="ignition-members">';
foreach($pages as $page) {
$ignition_title = get_post_meta($page->ID, 'ignition-title', true);
if ($ignition_title != "") {$ignition_title = ' <span class="ignition-title">'.$ignition_title.'</span>';}
if ($pic = catch_that_image($page->post_content)) {
$pic_style = ' style="background: url(\''.$pic.'\') center center" ';
} else { $pic_style = ""; }
echo '<div class="ignition-member">';
echo '<a href="' . get_permalink($page->ID) . '" title="'.$page->post_title.'" >';
echo '<span class="outter"><span class="pic" '.$pic_style.'>';
echo '</span>' . $ignition_title . str_replace(' ',' ',$page->post_title).'</span>';
echo '</a> </div> ';
}
echo "</div>";
}
}
?>
<?php get_header(); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<section>
<article id="post-<?php the_ID(); ?>">
<header>
<h1><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>
</header>
<section>
<?php the_content('Read more on "'.the_title('', '', false).'" »'); ?>
<h1>Officers</h1>
<?php get_people('officers'); ?>
<h1>Board Members</h1>
<?php get_people('board-of-directors'); ?>
<h1>Event Leads</h1>
<?php get_people('event-leads'); ?>
<h1>Regional Burning Man Representatives</h1>
<?php get_people('regional-burning-man-representatives'); ?>
</section>
<footer>
<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
</footer>
</article>
</section>
<?php endwhile; else: ?>
<section>
<article>
<p>Sorry, no posts matched your criteria.</p>
</article>
</section>
<?php endif; ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>