-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsidebar.php
More file actions
54 lines (37 loc) · 1.24 KB
/
sidebar.php
File metadata and controls
54 lines (37 loc) · 1.24 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
<aside id="blog-sidebar" class="col-12">
<div id="sidebar-search" class="col-12 no-padding">
<?php echo get_search_form(); ?>
</div>
<hr>
<h4 class="col-12 text-center no-padding">
Prensa Últimas
</h4>
<!-- <div class="row"> -->
<?php
$args = array(
// 'category_name' => 'sala-de-prensa',
'cat' => 4,
'posts_per_page' => 4
);
$q = new WP_Query($args);
if ($q->have_posts())://$q->the_post();
while ($q->have_posts()):$q->the_post();
?>
<article class="latest-post col-12">
<a class="latest-post-link col-12 no-padding" href="<?php echo get_the_permalink(); ?>">
<div class="latest-post-img col-12 imgLiquid imgLiquidFill">
<img src="<?php echo get_the_post_thumbnail_url(); ?>" alt="Coello Trejo Blog">
</div>
<div class="latest-post-txt col-12 no-padding">
<h6 class="col-12 no-padding"><?php echo the_title(); ?></h6>
<p class="col-12 text-center no-padding"><small><?php echo get_the_date(); ?></small></p>
<p class="col-12 no-padding text-right"><small>... Leer Más</small></p>
</div>
</a>
</article>
<?php
endwhile;
endif;
?>
<!-- </div> -->
</aside>