forked from fienen/wp-zerofour
-
Notifications
You must be signed in to change notification settings - Fork 0
/
home.php
140 lines (123 loc) · 6.98 KB
/
home.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
139
140
<?php
/**
* The main template file
*
* This is the most generic template file in a WordPress theme and one
* of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query,
* e.g., it puts together the home page when no home.php file exists.
*
* @link http://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage WP-ZeroFour
* @since WP-ZeroFour 1.0
*/
$wp04_theme_options = get_option( 'wp04_theme_options' );
$wp04_major_heading = $wp04_theme_options['major_heading'];
$wp04_major_subheading = $wp04_theme_options['major_subheading'];
$wp04_image_heading_photo_1 = $wp04_theme_options['image_heading_photo-1'];
$wp04_image_heading_title_1 = $wp04_theme_options['image_heading_title-1'];
$wp04_image_heading_subtitle_1 = $wp04_theme_options['image_heading_subtitle-1'];
$wp04_image_heading_icon_1 = $wp04_theme_options['image_heading_icon-1'];
$wp04_image_heading_icon_custom_1 = $wp04_theme_options['image_heading_icon_custom-1'];
if(strlen($wp04_image_heading_icon_custom_1) > 2) {
$wp04_image_heading_icon_1 = $wp04_image_heading_icon_custom_1;
}
$wp04_image_heading_photo_2 = $wp04_theme_options['image_heading_photo-2'];
$wp04_image_heading_title_2 = $wp04_theme_options['image_heading_title-2'];
$wp04_image_heading_subtitle_2 = $wp04_theme_options['image_heading_subtitle-2'];
$wp04_image_heading_icon_2 = $wp04_theme_options['image_heading_icon-2'];
$wp04_image_heading_icon_custom_2 = $wp04_theme_options['image_heading_icon_custom-2'];
if(strlen($wp04_image_heading_icon_custom_2) > 2) {
$wp04_image_heading_icon_2 = $wp04_image_heading_icon_custom_2;
}
$wp04_image_heading_photo_3 = $wp04_theme_options['image_heading_photo-3'];
$wp04_image_heading_title_3 = $wp04_theme_options['image_heading_title-3'];
$wp04_image_heading_subtitle_3 = $wp04_theme_options['image_heading_subtitle-3'];
$wp04_image_heading_icon_3 = $wp04_theme_options['image_heading_icon-3'];
$wp04_image_heading_icon_custom_3 = $wp04_theme_options['image_heading_icon_custom-3'];
if(strlen($wp04_image_heading_icon_custom_3) > 2) {
$wp04_image_heading_icon_3 = $wp04_image_heading_icon_custom_3;
}
$wp04_image_heading_text_below = $wp04_theme_options['image_heading_text_below'];
// $wp04_ = $wp04_theme_options[''];
// DEMO MODE BEGIN
$wp04_demo_mode = $wp04_theme_options['demo_mode'];
if (trim(strtolower($wp04_demo_mode)) != "false"){
if (empty($wp04_major_heading)){$wp04_major_heading = "This is an important heading";}
if (empty($wp04_major_subheading)){$wp04_major_subheading = "And this is where we talk about why we're <strong>pretty awesome</strong>";}
if (empty($wp04_image_heading_photo_1)){$wp04_image_heading_photo_1 = get_template_directory_uri() . "/images/stock/pic01.jpg";}
if (empty($wp04_image_heading_title_1)){$wp04_image_heading_title_1 = "Here's a Heading";}
if (empty($wp04_image_heading_subtitle_1)){$wp04_image_heading_subtitle_1 = "And a subtitle";}
if (empty($wp04_image_heading_icon_1)){$wp04_image_heading_icon_1 = " fa-user";}
if (empty($wp04_image_heading_icon_custom_1)){$wp04_image_heading_icon_custom_1 = "";}
if (empty($wp04_image_heading_photo_2)){$wp04_image_heading_photo_2 = get_template_directory_uri() . "/images/stock/pic02.jpg";}
if (empty($wp04_image_heading_title_2)){$wp04_image_heading_title_2 = "Also a Heading";}
if (empty($wp04_image_heading_subtitle_2)){$wp04_image_heading_subtitle_2 = "And Another subtitle";}
if (empty($wp04_image_heading_icon_2)){$wp04_image_heading_icon_2 = " fa-cog";}
if (empty($wp04_image_heading_icon_custom_2)){$wp04_image_heading_icon_custom_2 = "";}
if (empty($wp04_image_heading_photo_3)){$wp04_image_heading_photo_3 = get_template_directory_uri() . "/images/stock/pic03.jpg";}
if (empty($wp04_image_heading_title_3)){$wp04_image_heading_title_3 = "Another Heading";}
if (empty($wp04_image_heading_subtitle_3)){$wp04_image_heading_subtitle_3 = "And yes, a subtitle";}
if (empty($wp04_image_heading_icon_3)){$wp04_image_heading_icon_3 = " fa-bar-chart-o";}
if (empty($wp04_image_heading_icon_custom_3)){$wp04_image_heading_icon_custom_3 = "";}
if (empty($wp04_image_heading_text_below)){$wp04_image_heading_text_below = 'This is a demonstration of the <span style="white-space: nowrap;">WP-ZeroFour</span> WordPress template, which is based on a design by HTML5UP. To change this text, update the <span style="white-space: nowrap;">WP-ZeroFour</span> Options page in WP Admin. You can download the template and use it for free. To get the template, just visit the project\'s main page at GitHub (see link below) and download a ZIP file that you can upload to WordPress as a theme (installation instructions are in the ReadMe.md file). Download the template here: <span style="white-space: nowrap;"><a href="https://github.com/zdrive/wp-zerofour-v1_1" target="_blank">https://github.com/zdrive/wp-zerofour-v1_1</a></span>';}
} // END if ($wp04_demo_mode)
// DEMO MODE END
get_header(); ?>
<div class="main-wrapper-style1">
<div class="inner">
<!-- Feature 1 -->
<section class="container box-feature1">
<div class="row">
<div class="12u">
<header class="first major">
<h2><?php echo $wp04_major_heading; ?></h2>
<span class="byline"><?php echo $wp04_major_subheading; ?></span>
</header>
</div>
</div>
<div class="row">
<div class="4u">
<section>
<span class="image image-full"><img src="<?php echo $wp04_image_heading_photo_1; ?>" alt="" /></span>
<header class="second fa <?= $wp04_image_heading_icon_1; ?>">
<h3><?= $wp04_image_heading_title_1; ?></h3>
<span class="byline"><?= $wp04_image_heading_subtitle_1; ?></span>
</header>
</section>
</div>
<div class="4u">
<section>
<span class="image image-full"><img src="<?php echo $wp04_image_heading_photo_2; ?>" alt="" /></span>
<header class="second fa <?= $wp04_image_heading_icon_2; ?>">
<h3><?= $wp04_image_heading_title_2; ?></h3>
<span class="byline"><?= $wp04_image_heading_subtitle_2; ?></span>
</header>
</section>
</div>
<div class="4u">
<section>
<span class="image image-full"><img src="<?php echo $wp04_image_heading_photo_3; ?>" alt="" /></span>
<header class="second fa <?= $wp04_image_heading_icon_3; ?>">
<h3><?= $wp04_image_heading_title_3 ?></h3>
<span class="byline"><?= $wp04_image_heading_subtitle_3; ?></span>
</header>
</section>
</div>
</div>
<div class="row">
<div class="12u">
<p><?= $wp04_image_heading_text_below ?></p>
</div>
</div>
</section>
</div> <!-- class="inner" -->
</div> <!-- class="main-wrapper-style1" -->
<?php
get_template_part( 'loop', 'featured-pages' );
get_template_part( 'loop', 'recent-posts' );
?>
</div> <!-- .main-wrapper -->
<?php get_footer(); ?>