-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathredirect-page.php
42 lines (38 loc) · 1.55 KB
/
redirect-page.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
<?php
/**
* The coming soon template file.
*
* @package uncode
*/
get_header();
/** Get general datas **/
if (isset($metabox_data['_uncode_specific_style'][0]) && $metabox_data['_uncode_specific_style'][0] !== '') {
$style = $metabox_data['_uncode_specific_style'][0];
if (isset($metabox_data['_uncode_specific_bg_color'][0]) && $metabox_data['_uncode_specific_bg_color'][0] !== '') {
$bg_color = $metabox_data['_uncode_specific_bg_color'][0];
}
} else {
$style = ot_get_option('_uncode_general_style');
if (isset($metabox_data['_uncode_specific_bg_color'][0]) && $metabox_data['_uncode_specific_bg_color'][0] !== '') {
$bg_color = $metabox_data['_uncode_specific_bg_color'][0];
} else $bg_color = ot_get_option('_uncode_general_bg_color');
}
$bg_color = ($bg_color == '') ? ' style-'.$style.'-bg' : ' style-'.$bg_color.'-bg';
$redirect_page = ot_get_option('_uncode_redirect_page');
$the_content = get_post_field('post_content', $redirect_page);
if (has_shortcode($the_content, 'vc_row'))
{
$the_content = '<div class="post-content">' . $the_content . '</div>';
}
else
{
$the_content = apply_filters('the_content', $the_content);
$the_content = '<div class="post-content">' . uncode_get_row_template($the_content, '', '', $style, '', 'double', true, 'double') . '</div>';
}
/** Display post html **/
echo '<article id="post-'. get_the_ID().'" class="'.implode(' ', get_post_class('page-body style-'.$bg_color.'-bg')) .'">
<div class="post-wrapper">
<div class="post-body">' . do_shortcode($the_content) . '</div>
</div>
</article>';
get_footer(); ?>