-
Notifications
You must be signed in to change notification settings - Fork 1
/
page-blog.php
52 lines (44 loc) · 1.34 KB
/
page-blog.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
<?php
/**
* The template for displaying single pages
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package your-theme
*/
get_header(); ?>
<main>
<section class="dicas-blogueira">
<div class="container">
<?php the_title('<h1>', '</h1>'); ?>
<div class="row">
<?php
$argsPost = array(
'post_type' => 'post',
'post_per_page' => 3
);
$queryPost = new WP_Query($argsPost);
if ($queryPost->have_posts()) :
while ($queryPost->have_posts()) : $queryPost->the_post();
$excerpt = get_the_excerpt();
?>
<div class="col-md-4">
<div class="item-postBlog">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" class="d-block">
<img src="<?php the_post_thumbnail_url(); ?>" alt="<?php the_title(); ?>" class="img-fluid">
<h3><?php the_title(); ?></h3>
<span><?php echo string_limit_words($excerpt, 20); ?> [...]</span>
</a>
</div><!--item-postBlog-->
</div><!--col-md-4-->
<?php
endwhile;
endif;
wp_reset_query();
?>
</div><!--row-->
</div><!--container-->
</section><!--dicas-blogueira-->
</main>
<?php
get_footer();