-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtemplate-getinvolved.php
68 lines (65 loc) · 2.92 KB
/
template-getinvolved.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
<?php
/* Template name: Get involved */
get_header();
the_post();
global $post;
$in_child_page = ( $post->post_parent != 0 ) ? true : false;
$post_id = ( $in_child_page ) ? $post->post_parent : $post->ID;
$current_select_title = ( $in_child_page != 0 ) ? get_the_title( $post->ID ) : "I'm good at...";
?>
<section class="main-content">
<?php
$get_involved = get_page_by_path( 'get-involved' );
if ( has_post_thumbnail($get_involved->ID) ) {
echo '<figure class="page-featured-image extended">';
echo get_the_post_thumbnail( $get_involved->ID, 'landscape-featured' );
echo '<div class="content-wrap">';
echo '<div class="feature-content">';
echo '<h1 class="entry-title">'.get_the_title( $get_involved->ID ).'</h1>';
echo apply_filters('the_content', $get_involved->post_excerpt);
echo '</div>';
echo '</div>';
echo '</figure>';
}
?>
<div class="grid-container">
<div class="grid-x align-center sidebar sidebar-move-up tiny-space">
<div class="cell large-8 auto">
<div class="module big-select">
<?php
if ( $in_child_page ) {
echo '<span class="subtitle">I\'m good at</span>';
}
?>
<a href="#content-selector" class="select-label selector"><?php echo $current_select_title; ?> <i class="ion-arrow-down-b"></i></a>
<div class="content-selector closed" id="content-selector">
<ul class="menu vertical">
<?php
$params = array(
'child_of' => $post_id,
'show_date' => '',
'title_li' => ''
);
if ( $in_child_page ) {
$params['exclude'] = $post->ID;
}
wp_list_pages($params);
if ( $in_child_page ) {
echo '<li class="back-link"><a href="'.get_permalink($post_id).'"> <i class="ion-arrow-left-c"></i> Back</a></li>';
}
?>
</ul>
</div>
</div>
<section class="entry-content inner-space">
<div class="content-format">
<?php
the_content();
?>
</div>
</section>
</div>
</div>
</div>
</section>
<?php get_footer(); ?>