-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfront-page.php
More file actions
95 lines (89 loc) · 2.51 KB
/
front-page.php
File metadata and controls
95 lines (89 loc) · 2.51 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
<?php
/**
* The front page template.
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages
* and that other 'pages' on your WordPress site will use a
* different template.
*
* @since 1.0.0
*/
get_header();
global $paged;
$bavotasan_theme_options = bavotasan_theme_options();
if ( 2 > $paged ) {
// Display jumbo headline is the option is set
if ( is_active_sidebar( 'jumbo-headline' ) || ! empty( $bavotasan_theme_options['jumbo_headline_title'] ) ) {
?>
<div class="home-top">
<div class="container">
<div class="row">
<div class="col-md-12">
<?php
if ( is_active_sidebar( 'jumbo-headline' ) ) {
dynamic_sidebar( 'jumbo-headline' );
} else {
?>
<div class="home-jumbotron jumbotron">
<h1><?php echo apply_filters( 'the_title', html_entity_decode( $bavotasan_theme_options['jumbo_headline_title'] ) ); ?></h1>
<p><?php echo wp_kses_post( html_entity_decode( $bavotasan_theme_options['jumbo_headline_text'] ) ); ?></p>
</div>
<?php
}
?>
</div>
</div>
</div>
</div>
<?php
}
// Display home page top widgetized area
if ( is_active_sidebar( 'home-page-top-area' ) ) {
?>
<div id="home-page-widgets">
<div class="container">
<div class="row">
<?php dynamic_sidebar( 'home-page-top-area' ); ?>
</div>
</div>
</div>
<?php
}
}
if ( 'page' == get_option('show_on_front') ) {
include( get_page_template() );
} else {
?>
<div class="container">
<div class="row">
<div id="primary" <?php bavotasan_primary_attr(); ?>>
<?php
if ( have_posts() ) {
while ( have_posts() ) : the_post();
get_template_part( 'content', get_post_format() );
endwhile;
bavotasan_pagination();
} else {
if ( current_user_can( 'edit_posts' ) ) {
// Show a different message to a logged-in user who can add posts.
?>
<article id="post-0" class="post no-results not-found">
<h1 class="entry-title"><?php _e( 'Nothing Found', 'arcade' ); ?></h1>
<div class="entry-content description clearfix">
<p><?php printf( __( 'Ready to publish your first post? <a href="%s">Get started here</a>.', 'arcade' ), admin_url( 'post-new.php' ) ); ?></p>
</div><!-- .entry-content -->
</article>
<?php
} else {
get_template_part( 'content', 'none' );
} // end current_user_can() check
}
?>
</div><!-- #primary.c8 -->
<?php get_sidebar(); ?>
</div>
</div>
<?php
}
get_footer(); ?>