-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathguestbook.php
More file actions
105 lines (74 loc) · 2.54 KB
/
guestbook.php
File metadata and controls
105 lines (74 loc) · 2.54 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
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
<?php
/*
Template Name: Guestbook
*/
get_header();
GLOBAL $webnus_options;
$last_time = get_the_time(' F Y');
GLOBAL $webnus_page_options_meta;
$show_titlebar = null;
$titlebar_bg = null;
$titlebar_fg = null;
$have_sidebar = false;
$sidebar_pos = null;
$meta = $webnus_page_options_meta->the_meta();
if(!empty($meta)){
$show_titlebar = isset($meta['webnus_page_options'][0]['show_page_title_bar'])?$meta['webnus_page_options'][0]['show_page_title_bar']:null;
$titlebar_bg = isset($meta['webnus_page_options'][0]['title_background_color'])?$meta['webnus_page_options'][0]['title_background_color']:null;
$titlebar_fg = isset($meta['webnus_page_options'][0]['title_text_color'])?$meta['webnus_page_options'][0]['title_text_color']:null;
$titlebar_fs = isset($meta['webnus_page_options'][0]['title_font_size'])?$meta['webnus_page_options'][0]['title_font_size']:null;
$sidebar_pos = isset($meta['webnus_page_options'][0]['sidebar_position'])?$meta['webnus_page_options'][0]['sidebar_position']:'right';
$have_sidebar = !( 'none' == $sidebar_pos )? true : false;
}
if($show_titlebar && ( 'show' == $show_titlebar)):
?>
<section id="headline" style="<?php
/// To change the title bar background color
if(!empty($titlebar_bg)) echo ' background-color:'.$titlebar_bg.';';
/// To change the title bar text color
?>">
<div class="container">
<h3 style="<?php /* TEXT COLOR OF TITLE */ if(!empty($titlebar_fg)) echo ' color:'.$titlebar_fg.';'; if(!empty($titlebar_fs)) echo ' font-size:'.$titlebar_fs.';'; ?>"><?php the_title(); ?></h3>
</div>
</section>
<?php if( 1 == $webnus_options->webnus_enable_breadcrumbs() ) { ?>
<div class="breadcrumbs-w"><div class="container"><?php if('webnus_breadcrumbs') webnus_breadcrumbs(); ?></div></div>
<?php } ?>
<?php
endif;
?>
<section id="main-content" class="container">
<!-- Start Page Content -->
<?php
/*
LEFT SIDEBAR
*/
if( ('left' == $sidebar_pos) || ('both' == $sidebar_pos ) ) get_sidebar('left');
if( $have_sidebar ) {
?>
<section class="<?php echo('both' == $sidebar_pos )?'col-md-4 alpha omega':'col-md-8 omega'; ?>">
<article>
<?php
}
echo '<div class="row-wrapper-x">';
if( have_posts() ): while( have_posts() ): the_post();
the_content();
endwhile;
endif;
echo '</div>';
// wp_link_pages();
if ( comments_open() )
comments_template( '/guestbook-comments.php', true );
if( $have_sidebar ) {
?>
</article>
</section>
<?php
}
/*
RIGHT SIDEBAR
*/
if( ('right' == $sidebar_pos) || ('both' == $sidebar_pos) ) get_sidebar('right');
?>
</section>
<?php get_footer(); ?>