-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
67 lines (62 loc) · 1.5 KB
/
Copy pathindex.php
File metadata and controls
67 lines (62 loc) · 1.5 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
<?php get_header(); ?>
<!-- Banner -->
<?php
$editorial_banner_post_args = array(
'post_type' => 'banners'
);
$editorial_banner_post = new WP_Query( $editorial_banner_post_args );
if( is_front_page() && $editorial_banner_post->found_posts > 0 ) {
get_template_part( 'template-parts/banner' );
}
?>
<!-- Services Section -->
<?php
$editorial_service_post_args = array(
'post_type' => 'services'
);
$editorial_service_post = new WP_Query( $editorial_service_post_args );
if( is_front_page() && $editorial_service_post->found_posts > 0 ) {
get_template_part('template-parts/services');
}
?>
<!-- Section -->
<section>
<header class="major">
<h2>
<?php
if ( is_home() && is_front_page() ) {
_e( 'Blog', 'editorial' );
} else {
_e( 'Blog', 'editorial' );
}
?>
</h2>
</header>
<div class="posts">
<?php
if ( have_posts() ) :
while ( have_posts() ) : the_post();
// Getting Post
get_template_part( 'template-parts/posts/content', get_post_format() );
endwhile;
else:
get_template_part( 'template-parts/posts/content', 'none' );
endif;
?>
</div>
<?php
the_posts_pagination( array(
'screen_reader_text' => ' '
) );
?>
</section>
</div>
</div>
<!-- Sidebar -->
<?php
if ( is_active_sidebar( 'editorial_left_sidebar' ) || has_nav_menu( 'mainmenu' ) ) {
get_sidebar();
}
?>
</div>
<?php get_footer(); ?>