forked from Codeinwp/zerif-lite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
content-frontpage.php
138 lines (92 loc) · 4.17 KB
/
content-frontpage.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
<?php
/**
* Frontpage content
*
* @package zerif-lite
*/
$zerif_bigtitle_show = get_theme_mod( 'zerif_bigtitle_show' );
if ( ( isset( $zerif_bigtitle_show ) && $zerif_bigtitle_show != 1 ) || is_customize_preview() ) {
get_template_part( 'sections/big_title' );
}
?>
</header> <!-- / END HOME SECTION -->
<?php zerif_after_header_trigger(); ?>
<div id="content" class="site-content">
<?php
/* OUR FOCUS SECTION */
$zerif_ourfocus_show = get_theme_mod( 'zerif_ourfocus_show' );
if ( ( isset( $zerif_ourfocus_show ) && $zerif_ourfocus_show != 1 ) || is_customize_preview() ) {
get_template_part( 'sections/our_focus' );
}
/* RIBBON WITH BOTTOM BUTTON */
get_template_part( 'sections/ribbon_with_bottom_button' );
/* ABOUT US */
$zerif_aboutus_show = get_theme_mod( 'zerif_aboutus_show' );
if ( ( isset( $zerif_aboutus_show ) && $zerif_aboutus_show != 1 ) || is_customize_preview() ) {
get_template_part( 'sections/about_us' );
}
/* OUR TEAM */
$zerif_ourteam_show = get_theme_mod( 'zerif_ourteam_show' );
if ( ( isset( $zerif_ourteam_show ) && $zerif_ourteam_show != 1 ) || is_customize_preview() ) {
get_template_part( 'sections/our_team' );
}
/* TESTIMONIALS */
$zerif_testimonials_show = get_theme_mod( 'zerif_testimonials_show' );
if ( ( isset( $zerif_testimonials_show ) && $zerif_testimonials_show != 1 ) || is_customize_preview() ) {
get_template_part( 'sections/testimonials' );
}
/* RIBBON WITH RIGHT SIDE BUTTON */
get_template_part( 'sections/ribbon_with_right_button' );
/* LATEST NEWS */
$zerif_latestnews_show = get_theme_mod( 'zerif_latestnews_show' );
if ( ( isset( $zerif_latestnews_show ) && $zerif_latestnews_show != 1 ) || is_customize_preview() ) {
get_template_part( 'sections/latest_news' );
}
/* CONTACT US */
$zerif_contactus_show = get_theme_mod( 'zerif_contactus_show' );
if ( ( isset( $zerif_contactus_show ) && $zerif_contactus_show != 1 ) || is_customize_preview() ) :
echo '<section class="contact-us ' . ( ( is_customize_preview() && ( ! isset( $zerif_contactus_show ) || $zerif_contactus_show == 1 ) ) ? ' zerif_hidden_if_not_customizer ' : '' ) . '" id="contact">';
?>
<div class="container">
<!-- SECTION HEADER -->
<div class="section-header">
<?php
if ( current_user_can( 'edit_theme_options' ) ) {
$zerif_contactus_title = get_theme_mod( 'zerif_contactus_title', sprintf( '<a href="%1$s" class="zerif-default-links">%2$s</a>', esc_url( admin_url( 'customize.php?autofocus[control]=zerif_contactus_title' ) ), __( 'Get in touch', 'zerif-lite' ) ) );
} else {
$zerif_contactus_title = get_theme_mod( 'zerif_contactus_title' );
}
if ( ! empty( $zerif_contactus_title ) ) :
echo '<h2 class="white-text">' . wp_kses_post( $zerif_contactus_title ) . '</h2>';
elseif ( is_customize_preview() ) :
echo '<h2 class="white-text zerif_hidden_if_not_customizer"></h2>';
endif;
$contactus_subtitle_default = '';
if ( ! defined( 'PIRATE_FORMS_VERSION' ) ) {
/* translators: Pirate Forms plugin install link */
$contactus_subtitle_default = sprintf( __( 'You need to install %s to create a contact form.', 'zerif-lite' ), sprintf( '<a href="%1$s" class="zerif-default-links">%2$s</a>', esc_url( wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=pirate-forms' ), 'install-plugin_pirate-forms' ) ), 'Pirate Forms' ) );
}
if ( current_user_can( 'edit_theme_options' ) ) {
$zerif_contactus_subtitle = get_theme_mod( 'zerif_contactus_subtitle', $contactus_subtitle_default );
} else {
$zerif_contactus_subtitle = get_theme_mod( 'zerif_contactus_subtitle' );
}
if ( ! empty( $zerif_contactus_subtitle ) ) {
echo '<div class="white-text section-legend">' . wp_kses_post( $zerif_contactus_subtitle ) . '</div>';
} elseif ( is_customize_preview() ) {
echo '<h6 class="white-text section-legend zerif_hidden_if_not_customizer"></h6>';
}
?>
</div>
<!-- / END SECTION HEADER -->
<?php
if ( defined( 'PIRATE_FORMS_VERSION' ) && shortcode_exists( 'pirate_forms' ) ) :
echo '<div class="row">';
echo do_shortcode( '[pirate_forms]' );
echo '</div>';
endif;
?>
</div> <!-- / END CONTAINER -->
</section> <!-- / END CONTACT US SECTION-->
<?php
endif;