-
Notifications
You must be signed in to change notification settings - Fork 0
/
page-home.php
81 lines (61 loc) · 1.55 KB
/
page-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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php get_header(); ?>
<?php
$desc_img = esc_attr( get_option( 'desc_img' ) );
?>
<div id="content">
<?php
if ( have_posts() ):
while ( have_posts() ): the_post();
the_content();
endwhile;
endif;
?>
<div class="description">
<div class="image"
style="background-image: url(<?php print $desc_img; ?>)">
<?php
$args = array(
'type' => 'post',
'posts_per_page' => 1,
'category_name' => 'posts-home'
);
$post = new WP_Query( $args );
if( $post -> have_posts() ): $post -> the_post(); ?>
<article>
<h1><?php the_title(); ?></h1>
<p><?php the_content(); ?></p>
</article>
<?php
endif;
wp_reset_postdata();
?>
</div> <!-- .image -->
</div> <!-- .description -->
<div class="section">
<h3 class="center">MEDIA</h3>
</div> <!-- .section -->
<div class="container">
<div class="row">
<div class="recent col-xs-12 col-md-8">
<?php
$args = array(
'type' => 'post',
'posts_per_page' => 4,
'category_name' => 'posts-news'
);
$posts = new WP_Query( $args );
if ( $posts -> have_posts() ):
while ( $posts -> have_posts() ): $posts -> the_post();
get_template_part( 'content', get_post_format() );
endwhile;
endif;
wp_reset_postdata();
?>
</div> <!-- .recent -->
<div class="col-xs-12 col-md-4">
<?php get_sidebar(); ?>
</div> <!-- .col-md-4 -->
</div> <!-- .row -->
</div> <!-- .container -->
</div> <!-- #content -->
<?php get_footer(); ?>