-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhome.php
47 lines (28 loc) · 937 Bytes
/
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
<?php
/**
* The main page template file.
*
* @package understrap
*/
get_header();
$container = get_theme_mod( 'understrap_container_type' );
?>
<?php if ( is_front_page() && is_home() ) : ?>
<?php get_template_part( 'global-templates/hero' ); ?>
<?php endif; ?>
<div id="index-wrapper">
<div class="<?php echo esc_attr( $container ); ?>" id="content" tabindex="-1">
<hr class="header-line" id="mp-line">
<?php $cat_query = new WP_Query( 'category_name=main-page-article' ); ?>
<?php if ($cat_query->have_posts()) : ?>
<div class="row mp-articles">
<?php for ($i = 0; $i < 8 && $cat_query->have_posts(); $i++) : $cat_query->the_post(); ?>
<div class="col-sm-3">
<?php get_template_part( 'loop-templates/content-mainpage', get_post_format() ); ?>
</div>
<?php endfor; ?>
</div>
<?php endif; ?>
</div><!-- Container end -->
</div><!-- Wrapper end -->
<?php get_footer(); ?>