This repository was archived by the owner on Jul 14, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontent-highlights.php
More file actions
90 lines (90 loc) · 3.53 KB
/
Copy pathcontent-highlights.php
File metadata and controls
90 lines (90 loc) · 3.53 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<!-- Destaques -->
<section class="destaques">
<div class="container">
<div class="destaques-title">
<h2 class="line-bottom">Destaques</h2>
</div>
<div class="destaques-content">
<div class="row">
<?php
$args = array(
'posts_per_page' => 1,
'post_type' => 'post',
'meta_key' => 'bvs_highlight',
'meta_value' => 'big'
);
$big_highlight = new WP_Query( $args );
if ( $big_highlight->have_posts() ) {
while ( $big_highlight->have_posts() ) {
$big_highlight->the_post();
?>
<div class="col-12 col-lg-6">
<div class="featured" style="background-image: url(<?php echo get_the_post_thumbnail_url(null, 'large'); ?>);">
<div class="featured-content">
<span class="marking" style="background-color: #71B42D"><a href="<?php echo get_category_link(get_the_category()[0]->term_id); ?>"><?php echo get_the_category()[0]->cat_name; ?></a></span>
<h6 class="fc-title">
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
</h6>
<span class="published">Publicado em <?php echo get_the_date("d/m/Y") ?></span>
<p class="fc-text">
<?php echo get_the_excerpt(); ?>
<a href="<?php the_permalink(); ?>">Ler mais</a>
</p>
</div>
</div>
</div>
<?php
}
wp_reset_postdata();
}
?>
<div class="col-12 col-lg-6">
<?php
$args = array(
'posts_per_page' => 3,
'post_type' => 'post',
'meta_key' => 'bvs_highlight',
'meta_value' => 'small'
);
$small_highlight = new WP_Query( $args );
if ( $small_highlight->have_posts() ) {
while ( $small_highlight->have_posts() ) {
$small_highlight->the_post();
?>
<div class="destaque-post">
<div class="row">
<div class="col-12 col-md-4 col-lg-6 col-xl-5">
<a href="<?php the_permalink(); ?>">
<?php the_post_thumbnail('small_highlight') ?>
</a>
</div>
<div class="col-12 col-md-8 col-lg-6 col-xl-7">
<div class="post-item">
<span class="marking" style="background-color: #95B515"><a href="<?php echo get_category_link(get_the_category()[0]->term_id); ?>"><?php echo get_the_category()[0]->cat_name; ?></a></span>
<h6 class="fc-title">
<a href="<?php the_permalink() ?>"><?php echo wp_trim_words(get_the_title(), '12'); ?></a>
</h6>
<span class="published">Publicado em <?php echo get_the_date("d/m/Y") ?></span>
<p class="fc-text">
<?php echo get_the_excerpt(); ?>
<a href="<?php the_permalink(); ?>">Ler mais</a>
</p>
</div>
</div>
</div>
</div>
<?php
}
wp_reset_postdata();
}
?>
<div class="row">
<div class="col-12 text-center">
<a class="btn btn-success btn-lg" href="<?php echo get_permalink( get_option( 'page_for_posts' ) ); ?>" style="padding-top: 14px;">Ver Todos</a>
</div>
</div>
</div>
</div>
</div>
</div>
</section>