-
Notifications
You must be signed in to change notification settings - Fork 0
/
template-ourwork.php
executable file
·135 lines (134 loc) · 6.33 KB
/
template-ourwork.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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<?php
/*
Template Name: Our Work Template
*/
?>
<?php get_header(); ?>
<div id="main">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="blocks-holder">
<?php if (has_post_thumbnail()) : ?>
<div class="ad">
<div class="holder">
<div class="frame">
<?php
$banner_link = get_post_meta($post->ID, 'banner_link', true);
?>
<a href="<?php echo $banner_link; ?>">
<?php the_post_thumbnail('banner'); ?>
<span class="ad-t-l"> </span>
<span class="ad-t-r"> </span>
<span class="ad-b-l"> </span>
<span class="ad-b-r"> </span>
</a>
</div>
</div>
</div>
<?php endif; ?>
<div class="intro-block">
<div class="holder">
<div class="frame">
<h1><?php the_title(); ?></h1>
<?php custom_the_content2('Read the rest of this entry »'); ?>
</div>
</div>
</div>
</div>
<?php endwhile; ?>
<?php endif; ?>
<?php
// Offerings category hardcoded
$cat_id = 21;
$query_posts = query_posts(array(
'post_type' => 'post',
'post_status' => 'publish',
'order' => 'DESC',
'echo' => 1,
'cat' => $cat_id
)
);
$count = count($query_posts);
if ($count > 0) :
wp_reset_query();
?>
<div class="block">
<div class="holder">
<div class="frame">
<h2>PRODUCTS & SERVICES</h2>
<div class="news-block hfeed">
<?php
query_posts(array(
'post_type' => 'post',
'post_status' => 'publish',
'order' => 'DESC',
'cat' => $cat_id
)
);
$num = 1;
?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="news-row hentry">
<?php if (has_post_thumbnail()) : ?>
<a href="<?php the_permalink(); ?>">
<?php
if ($num % 2 == 0) {
$class = ' alignright photo';
$class1 = ' contrary';
} else {
$class = ' photo';
$class1 = ' ';
}
?>
<div class="mask mask3">
<a href="<?php the_permalink(); ?>">
<?php the_post_thumbnail('large', 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>
</a>
<?php endif; ?>
<h2 class="entry-title entry-summary"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php the_excerpt(); ?>
<div class="row-section <?php echo $class1; ?>">
<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 $num++; ?>
<?php endwhile; ?>
<?php endif; ?>
<?php wp_reset_query(); ?>
</div>
</div>
</div>
</div>
<?php endif; ?>
<div class="block">
<div class="holder">
<div class="frame">
<h2>TESTIMONIALS</h2>
<div class="testimonials">
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Testimonials Sidebar') ) : ?>
<?php endif; ?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php get_footer(); ?>