-
Notifications
You must be signed in to change notification settings - Fork 2
/
front-page.php
112 lines (73 loc) · 3.99 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
105
106
107
108
109
110
111
112
<?php
/**
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package relia
*/
get_header();
?>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php $front = get_option('show_on_front'); ?>
<?php if ( $front != 'posts' ) :
do_action( 'relia_jumbotron' );
do_action( 'relia_homepage' );
else :
do_action( 'relia_jumbotron' );
endif; ?>
<div class="container-fluid front-page-content">
<div class="row">
<div class="col-sm-12">
<h2 class="wow fadeInDown feature-content-title">
<?php if ( get_theme_mod( 'relia_homepage_content_title_toggle', 'show' ) == 'show' ) : ?>
<?php echo esc_attr( get_theme_mod( 'relia_homepage_content_title', __( 'Featured Content', 'relia' ) ) ); ?>
<?php endif; ?>
</h2>
</div>
<div class="container">
<div class="row">
<div class="homepage-page-content col-sm-12">
<?php if (have_posts()) : ?>
<?php if (is_home() && !is_front_page()) : ?>
<header>
<h1 class="page-title screen-reader-text"><?php single_post_title(); ?></h1>
</header>
<?php endif; ?>
<?php echo $front == 'posts' ? '<div class="relia-blog-content">' : ''; ?>
<?php /* Start the Loop */ ?>
<?php while (have_posts()) : the_post(); ?>
<?php
if ($front == 'posts') :
get_template_part('template-parts/content-blog', get_post_format());
else:
get_template_part('template-parts/content-page-home', get_post_format());
endif;
?>
<?php endwhile; ?>
<?php echo $front == 'posts' ? '</div>' : ''; ?>
<?php if ($front == 'posts') : ?>
<?php $paginate_links = paginate_links( array(
'total' => $wp_query->max_num_pages,
) ); ?>
<?php if ( $paginate_links ) : ?>
<div class="col-sm-4">
<div>
<div class="pagination-links">
<?php echo $paginate_links; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
<?php else : ?>
<?php get_template_part('template-parts/content', 'none'); ?>
<?php endif; ?>
</div>
</div><!-- row -->
</div><!-- container-->
</div> <!-- row -->
</div><!-- container-fluid -->
</main><!-- #main -->
</div><!-- #primary -->
<?php get_footer(); ?>