forked from theymc/season_8_theme
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsingle-programs.php
More file actions
111 lines (95 loc) · 3.65 KB
/
single-programs.php
File metadata and controls
111 lines (95 loc) · 3.65 KB
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<?php
$tdir = get_bloginfo('template_directory');
get_header(); ?>
<div id="main">
<div id="main_content">
<?php
// Conditionally display post content (based on whether or not your query returned any posts
if(have_posts()):
// While posts were returned, iterate through them all
while(have_posts()):
the_post();
?>
<article>
<h1><span><?php the_title(); ?></span> <a href="<?php the_field('registration_link'); ?>" class="event_cta"><?php the_field('register_cta'); ?></a></h1>
<?php the_content(); ?>
<?php
// Find connected pages
$connected = new WP_Query( array(
'connected_type' => 'module_to_program',
'connected_items' => $post,
'nopaging' => true
// 'connected_orderby' => $meta_key,
// 'connected_order' => 'asc'
) );
if ( $connected->have_posts() ) :
// Display connected pages
echo '<h2>Topics:</h2><ul>';
while ( $connected->have_posts() ) : $connected->the_post();
?>
<li>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php the_title(); ?>
</a>
</li>
<?php endwhile; ?>
<?php endif; ?>
</ul>
<?php
wp_reset_postdata(); // set $post back to original post
endwhile;
endif;
?>
<?php
// Find connected pages
$connected = new WP_Query( array(
'connected_type' => 'team_to_program',
'connected_items' => $post,
'nopaging' => true
) );
// Display connected pages
echo '<h3>Instructors</h3><ul>';
while ( $connected->have_posts() ) : $connected->the_post();
?>
<li>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php the_title(); ?>
</a>
</li>
<?php
endwhile;
wp_reset_postdata(); // set $post back to original post
?>
</article>
</div>
</div>
<section class="newsletter">
<div id="wufoo-m7x3w7">
Fill out my <a href="http://markreale.wufoo.com/forms/m7x3w7">online form</a>.
</div>
<script type="text/javascript">var m7x3w7;(function(d, t) {
var s = d.createElement(t), options = {
'userName':'markreale',
'formHash':'m7x3w7',
'autoResize':true,
'height':'260',
'async':true,
'header':'show'};
s.src = ('https:' == d.location.protocol ? 'https://' : 'http://') + 'wufoo.com/scripts/embed/form.js';
s.onload = s.onreadystatechange = function() {
var rs = this.readyState; if (rs) if (rs != 'complete') if (rs != 'loaded') return;
try { m7x3w7 = new WufooForm();m7x3w7.initialize(options);m7x3w7.display(); } catch (e) {}};
var scr = d.getElementsByTagName(t)[0], par = scr.parentNode; par.insertBefore(s, scr);
})(document, 'script');</script>
</section>
<section class="about">
<figure class="ymc_alt_logo">
<img src="<?php echo $tdir; ?>/assets/images/ymc_logo_alt.png" alt="YMC Logo" width="203" height="145" />
<figcaption>
<p>
The YMC's mandate is to make technology learning resources available to everyone everywhere regardless of geography, age, gender, background, future-ground, or anything else that could distinguish human beings apart.
</p>
</figcaption>
</figure>
</section>
<?php get_footer(); ?>