-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate-frontpage.php
74 lines (55 loc) · 2.69 KB
/
template-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
<?php
/*
Template Name: Frontpage Template
*/
?>
<?php get_header(); ?>
<?php $options = get_option('zeefocus_options'); // Get Theme Options from Database ?>
<div id="frontpage-image-wrap">
<?php // Show Custom Header image as frontpage image if option is checked
if( get_header_image() != '' and (isset($options['themeZee_frontpage_image_source']) and $options['themeZee_frontpage_image_source'] == "header" )) : ?>
<div id="custom-header" class="container header-image">
<img src="<?php echo get_header_image(); ?>" />
</div>
<?php endif; ?>
<?php // Show Individual Image as frontpage image if option is checked and images was uploaded
if( ( isset($options['themeZee_frontpage_image_source']) and $options['themeZee_frontpage_image_source'] == "upload" ) and
( isset($options['themeZee_frontpage_image_upload']) and $options['themeZee_frontpage_image_upload'] <> '' )) : ?>
<div id="frontpage-individual-image" class="container header-image">
<img src="<?php echo esc_url($options['themeZee_frontpage_image_upload']); ?>" />
</div>
<?php endif; ?>
<?php // Show Frontpage Header Title
if( isset($options['themeZee_frontpage_page_header']) and $options['themeZee_frontpage_page_header'] <> "" ) : ?>
<div id="page-header" class="container">
<h2 class="page-title"><?php echo esc_attr($options['themeZee_frontpage_page_header']); ?></h2>
</div>
<?php endif; ?>
</div>
<div id="wrap" class="container template-frontpage">
<?php // Display Frontpage Intro text
if(isset($options['themeZee_frontpage_intro_text']) and $options['themeZee_frontpage_intro_text'] != '' ) : ?>
<div id="frontpage-intro" class="clearfix">
<?php // Check if Frontpage Intro Button should be displayed
if(isset($options['themeZee_frontpage_button_text']) and $options['themeZee_frontpage_button_text'] != '' ) : ?>
<p id="frontpage-intro-left" class="frontpage-intro-text">
<?php echo do_shortcode(wp_kses_post($options['themeZee_frontpage_intro_text'])); ?>
</p>
<div id="frontpage-intro-button">
<a href="<?php echo esc_url($options['themeZee_frontpage_button_destination']); ?>">
<?php echo esc_attr($options['themeZee_frontpage_button_text']); ?>
</a>
</div>
<?php else : ?>
<p class="frontpage-intro-text"><?php echo do_shortcode(wp_kses_post($options['themeZee_frontpage_intro_text'])); ?></p>
<?php endif; ?>
</div>
<?php endif; ?>
<?php // Display Frontpage Widgets #1
if(is_active_sidebar('frontpage-widgets-one')) : ?>
<div id="frontpage-widgets-one" class="frontpage-widgets clearfix">
<?php dynamic_sidebar('frontpage-widgets-one'); ?>
</div>
<?php endif; ?>
</div>
<?php get_footer(); ?>