-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle-project.php
190 lines (136 loc) · 8.37 KB
/
single-project.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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<?php
/**
* The template for displaying all single posts
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
*
* @package WordPress
* @subpackage Twenty_Seventeen
* @since 1.0
* @version 1.0
*/
get_header(); ?>
<div class="wrap">
<div id="primary" class="content-area blog-content-area">
<main id="main" class="site-main" role="main">
<?php
/* Start the Loop */
while ( have_posts() ) : the_post();
$project_employer = get_post_meta( get_the_ID() , 'wpcf-project_employer' , true );
$project_date = get_post_meta( get_the_ID() , 'wpcf-project_date' , true );
$project_description = get_post_meta( get_the_ID() , 'wpcf-project_description' , true );
$project_gallery_one = get_post_meta( get_the_ID() , 'wpcf-project_gallery_one' , false );
$project_gallery_two = get_post_meta( get_the_ID() , 'wpcf-project_gallery_two' , false );
$project_gallery_three = get_post_meta( get_the_ID() , 'wpcf-project_gallery_three' , false );
?>
<div class="single-project">
<div class="sliders-img">
<div class="row">
<div class="col-sm-3">
<div class="single-content-container">
<div class="arrows-box">
<?php
$prev_post = get_previous_post();
if (!empty( $prev_post )): ?>
<a class="arrow previous" href="<?php echo esc_url( get_permalink( $prev_post->ID ) ); ?>" title="<?php echo esc_attr( $prev_post->post_title ); ?>"><i class="fa fa-angle-left"></i></a>
<?php endif; ?>
<?php
$next_post = get_next_post();
if (!empty( $next_post )): ?>
<a class="arrow next" href="<?php echo esc_url( get_permalink( $next_post->ID ) ); ?>" title="<?php echo esc_attr( $next_post->post_title ); ?>"><i class="fa fa-angle-right"></i></a>
<?php endif; ?>
</div>
<div class="content-inner">
<div class="title">
<h4><?php the_title(); ?></h4>
<strong><?php echo __( 'Employer:' , 'mafiran' ). " " . apply_filters( 'the_title' , $project_employer );?></strong>
<div class="date"><?php echo __( 'Date:' , 'mafiran' ). " " . apply_filters( 'the_title' , $project_date );?></div>
</div>
<div class="spr-general"></div>
<div class="desc"><?php echo apply_filters( 'mafiran_short_description' , $project_description );?></div>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="content-container">
<div class="content-inner">
<!--<div class="title"><h3>Ah oui…</h3></div> -->
<div class="desc"><?php the_content();?></div>
<div class="spr-general"></div>
</div>
</div>
<div class="slide-container slide-first sed-mafiran-slider" data-pause="no" data-slider-nav=".sed-mafiran-slider.slide-second">
<?php
foreach ( $project_gallery_one As $image_url ) {
$attachment_id = mafiran_get_attachment_id_by_url( $image_url );
$img = get_sed_attachment_image_html( $attachment_id , '' , '640X640' );
if ( ! $img ) {
$img = array();
$img['thumbnail'] = '<img class="sed-image-placeholder sed-image" src="' . sed_placeholder_img_src() . '" />';
}
?>
<div class="slide-item">
<?php echo $img['thumbnail'];?>
</div>
<?php
}
?>
</div>
</div>
<div class="clear"></div>
<div class="clear"></div>
<div class="col-sm-3">
<div class="slide-container slide-second slide-thumb sed-mafiran-slider" data-pause="no" data-slider-nav=".sed-mafiran-slider.slide-first">
<?php
foreach ( $project_gallery_two As $image_url ) {
$attachment_id = mafiran_get_attachment_id_by_url( $image_url );
$img = get_sed_attachment_image_html( $attachment_id , '' , '320X320' );
if ( ! $img ) {
$img = array();
$img['thumbnail'] = '<img class="sed-image-placeholder sed-image" src="' . sed_placeholder_img_src() . '" />';
}
?>
<div class="slide-item">
<?php echo $img['thumbnail'];?>
</div>
<?php
}
?>
</div>
</div>
<div class="col-sm-6 text-left">
<div class="arrows-box mafiran-next-prev-controler">
<a class="arrow previous" href="javascript:;"><i class="fa fa-angle-left"></i></a>
<a class="arrow next" href="javascript:;"><i class="fa fa-angle-right"></i></a>
</div>
</div>
<div class="col-sm-3">
<div class="slide-container slide-third slide-thumb sed-mafiran-slider" data-pause="no">
<?php
foreach ( $project_gallery_three As $image_url ) {
$attachment_id = mafiran_get_attachment_id_by_url( $image_url );
$img = get_sed_attachment_image_html( $attachment_id , '' , '320X320' );
if ( ! $img ) {
$img = array();
$img['thumbnail'] = '<img class="sed-image-placeholder sed-image" src="' . sed_placeholder_img_src() . '" />';
}
?>
<div class="slide-item">
<?php echo $img['thumbnail'];?>
</div>
<?php
}
?>
</div>
</div>
</div>
</div>
</div>
<?php
endwhile; // End of the loop.
?>
</main><!-- #main -->
</div><!-- #primary -->
<?php get_sidebar(); ?>
</div><!-- .wrap -->
<?php get_footer();