-
Notifications
You must be signed in to change notification settings - Fork 0
/
template-contact.php
executable file
·114 lines (113 loc) · 5.63 KB
/
template-contact.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
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
112
113
114
<?php
/*
Template Name: Contact Template
*/
?>
<?php get_header(); ?>
<div id="main">
<div class="intro-content">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="intro-block">
<div class="holder">
<div class="frame">
<h1><?php the_title(); ?></h1>
<div class="lang-columns">
<?php the_content('Read the rest of this entry »'); ?>
</div>
</div>
</div>
</div>
<?php
$contact_text = get_post_meta($post->ID, 'contact_text', true);
if ( !empty($contact_text) ) {
echo $contact_text;
}
?>
<?php endwhile; ?>
<?php endif; ?>
<?php
$page_id = get_post_meta($post->ID, 'page_id', true);
$query_posts = query_posts(array(
'post_type' => 'page',
'post_parent' => $page_id,
'echo' => 1,
'orderby' => 'menu_order'
)
);
$count = count($query_posts);
if ($count > 0) :
?>
<div class="intro-block">
<div class="holder">
<div class="frame">
<h2>OUR TEAM</h2>
<div class="news-holder hfeed">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="news-row hentry">
<?php if (has_post_thumbnail()) : ?>
<div class="mask mask2">
<a href="<?php the_permalink(); ?>">
<?php the_post_thumbnail('contact-image', array('class' => 'photo')); ?>
</a>
<span class="corner lt-top"> </span>
<span class="corner rt-top"> </span>
<span class="corner rt-bottom"> </span>
<span class="corner lt-bottom"> </span>
</div>
<?php endif; ?>
<h2 class="entry-title entry-summary"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php
$person = get_post_meta($post->ID, 'person', true);
if ( !empty($person) ) {
echo $person;
}
?>
<?php custom_the_content('Read the rest of this entry »'); ?>
<div class="row-section">
<ul class="social-networks">
<?php
$social_icon = get_post_meta($post->ID, 'social_icon', false);
if ( !empty($social_icon) ) {
foreach ($social_icon as $item) {
echo '<li>'. $item .'</li>';
}
}
?>
</ul>
<a class="more" href="<?php the_permalink(); ?>">read more</a>
</div>
</div>
<?php endwhile; ?>
<?php wp_reset_query(); ?>
<?php endif; ?>
</div>
</div>
</div>
</div>
<?php endif; ?>
</div>
<div id="sidebar">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php
$social_icon = get_post_meta($post->ID, 'social_icon', false);
if (!empty($social_icon)) {
echo '<ul class="social-networks another">';
foreach ($social_icon as $value) {
echo '<li>'.$value.'</li>';
}
echo '</ul>';
}
?>
<?php endwhile; ?>
<?php endif; ?>
<?php include('left-sidebar.php'); ?>
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Tag Cloud Left Sidebar') ) : ?>
<?php endif; ?>
</div>
</div>
</div>
</div>
<?php get_footer(); ?>