-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfront-page.php
104 lines (93 loc) · 4.06 KB
/
front-page.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
<?php
/**
* Front Page
*
* Note: You can overwrite home.php as well as any other Template in Child Theme.
* Create the same file (name) and you're all set to go!
*
* @file front-page.php
* @package WordPress
* @subpackage Shell
* @author Emil Uzelac, nofearinc
* @copyright 2003 - 2012 ThemeID, 2013 DevWP
* @license license.txt
* @version Release: 1.0
* @filesource wp-content/themes/shell-lite/front-page.php
* @link N/A
* @since available since Release 1.0
*/
?>
<?php get_header(); ?>
<div id="content-full" class="grid col-940">
<?php
// Get Shell Lite options
$options = get_option( 'shell_theme_options' );
// First let's check if headline was set
if ( ! empty( $options['home_headline'] ) ) {
echo '<h1 class="featured-title">';
echo $options['home_headline'];
echo '</h1>';
// If not display dummy headline for preview purposes
} else {
echo '<h1 class="featured-title">';
_e( 'Your H1 Headline Goes Right Here. Great for SEO!', 'shell' );
echo '</h1>';
}
?>
<div class="grid col-460">
<?php if ( empty( $options['featured_image_link'] ) || $options['featured_image_link'] == null ) { ?>
<img class="featured-image" src="<?php echo get_stylesheet_directory_uri(); ?>/images/featured-image.jpg" width="440" height="300" alt="" />
<?php } else { ?>
<img class="featured-image" src="<?php echo $options['featured_image_link']; ?>" width="440" height="300" alt="" />
<?php } ?>
</div><!-- end of .col-460 -->
<div class="grid col-460 fit">
<?php
// First let's check if headline was set
if ( ! empty( $options['home_subheadline'] ) ) {
echo '<h2 class="featured-subtitle">';
echo $options['home_subheadline'];
echo '</h2>';
} else { // If not display dummy headline for preview purposes
echo '<h2 class="featured-subtitle">';
_e( 'Your H2 Subheadline Here', 'shell' );
echo '</h2>';
}
?>
<?php
// First let's check if content is in place
if ( ! empty( $options['home_content_area'] ) ) {
echo '<p class="featured-content-area">';
echo $options['home_content_area'];
echo '</p>';
} else { // If not let's show dummy content for demo purposes
echo '<p class="featured-content-area">';
_e( 'Properly structured landing page is big part of the Search Engine Optimization. Shell is a hassle-free WordPress CMS Theme. All of the content on this landing page
is fully manageable directly from Theme Options, including call-to-action button and its destination.', 'shell' );
echo '</p>';
}
?>
<?php
// Hide Featured Button if checkbox is checked
if ( empty( $options['featured_button_hide'] ) || ( $options['featured_button_hide'] == false ) ) {
$button_url = '#nogo';
$button_text = __( 'Call to Action', 'shell' );
$button_target = '';
if ( ! empty( $options['featured_button_link'] ) ) {
$button_url = $options['featured_button_link'];
}
if ( ! empty( $options['featured_button_text'] ) ) {
$button_text = $options['featured_button_text'];
}
if ( ! empty( $options['featured_button_link_target'] ) && $options['featured_button_link_target'] == 1 ) {
$button_target = 'target="_blank"';
}
echo '<div class="featured-button"><p>';
echo '<a href="'. $button_url .'" '. $button_target .'>'. $button_text .'</a>';
echo '</p></div><!-- end of .featured-button -->';
}
?>
</div><!-- end of .col-460 fit -->
</div><!-- end of #content-full -->
<?php get_sidebar( 'home' ); ?>
<?php get_footer(); ?>