-
Notifications
You must be signed in to change notification settings - Fork 0
/
sidebar.php
40 lines (36 loc) · 1.11 KB
/
sidebar.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
<div id="sidebar">
<div id="side">
<?php dynamic_sidebar( 'sidebar' ); ?>
<?php $myposts = get_posts( array(
'post_type' => 'post',
'posts_per_page' => '10'
) );
if( $myposts ): ?>
<aside class="recent">
<h2><span>New</span></h2>
<ul>
<?php foreach($myposts as $post): setup_postdata($post); ?>
<li>
<a href="<?php the_permalink(); ?>">
<div class="row">
<div class="col-4">
<div class="image-wrapper">
<div class="div-cover" style="background-image: url(<?php echo mythumb( 'medium' ); ?>)">
</div>
</div>
</div>
<div class="col-8">
<div class="text">
<p><?php the_title(); ?></p>
</div>
</div>
</div>
</a>
</li>
<?php endforeach; ?>
</ul>
</aside>
<?php wp_reset_postdata(); endif; ?>
<?php dynamic_sidebar( 'sidebar_bottom' ); ?>
</div>
</div>