-
Notifications
You must be signed in to change notification settings - Fork 0
/
home.php
executable file
·63 lines (44 loc) · 1.77 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
<?php
/**
* The Home template file.
*
* @package Catch Themes
* @subpackage Catch Everest
* @since Catch Everest 1.0
*/
get_header();
global $post, $wp_query, $catcheverest_options_settings;
// Getting data from Theme Options
$options = $catcheverest_options_settings;
$enable_post = $options[ 'enable_posts_home' ];
// Front page displays in Reading Settings
$page_on_front = get_option('page_on_front') ;
$page_for_posts = get_option('page_for_posts');
// Get Page ID outside Loop
$page_id = $wp_query->get_queried_object_id();
if ( !empty( $enable_post ) || ( !empty( $page_id ) && $page_id == $page_for_posts ) ) {
?>
<div id="primary" class="content-area">
<div id="content" class="site-content" role="main">
<?php if ( have_posts() ) : ?>
<?php catcheverest_content_nav( 'nav-above' ); ?>
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php
/* Include the Post-Format-specific template for the content.
* If you want to overload this in a child theme then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'content', get_post_format() );
?>
<?php endwhile; ?>
<?php catcheverest_content_nav( 'nav-below' ); ?>
<?php else : ?>
<?php get_template_part( 'no-results', 'index' ); ?>
<?php endif; ?>
</div><!-- #content .site-content -->
</div><!-- #primary .content-area -->
<?php
get_sidebar();
}
get_footer(); ?>