-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsingle-uncodeblock.php
More file actions
47 lines (37 loc) · 1.06 KB
/
single-uncodeblock.php
File metadata and controls
47 lines (37 loc) · 1.06 KB
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
<?php
/**
* The Template for displaying all content block posts.
*
* @package uncode
*/
get_header();
/**
* DATA COLLECTION - START
*
*/
/** Init variables **/
$with_builder = false;
$style = ot_get_option('_uncode_general_style');
$bg_color = ' style-'.$style.'-bg';
while (have_posts()):
the_post();
echo '<script type="text/javascript">UNCODE.initHeader();</script>';
$the_content = get_the_content();
if (has_shortcode($the_content, 'vc_row')) $with_builder = true;
if ($with_builder)
{
$the_content = '<div class="post-content">' . $the_content . '</div>';
}
else
{
$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' . $bg_color)) .'">
<div class="post-wrapper">
<div class="post-body">' . do_shortcode($the_content) . '</div>
</div>
</article>';
endwhile;
// end of the loop.
get_footer(); ?>