-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpage-memes.php
More file actions
30 lines (30 loc) · 1.11 KB
/
page-memes.php
File metadata and controls
30 lines (30 loc) · 1.11 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
<?php while(have_posts()): the_post(); ?>
<div class="page-title">
<div class="w-container">
<h1 class="page-title-heading"><?php the_title(); ?></h1>
</div>
</div>
<div>
<div class="w-container">
<div class="page-text">
<h3 class="subheading lato">BAIXE OS MEMES E ESPALHE</h3>
<p class="lato">Clique no meme, faça o download e compartilhe!</p>
<div class="w-dyn-list">
<div class="w-clearfix w-dyn-items w-row">
<?php
$args = array ('post_type' => 'meme', 'posts_per_page' => -1);
$myposts = get_posts( $args );
foreach( $myposts as $post ) :
setup_postdata($post);
$url = wp_get_attachment_url(get_post_thumbnail_id($post->ID,'square-medium'));
?>
<div class="w-dyn-item w-col w-col-3">
<a href="<?php the_permalink(); ?>" target="_blank" class="meme w-inline-block" style="background-image: url(<?php echo $url; ?>);"></a>
</div>
<?php endforeach; ?>
</div>
</div>
</div>
</div>
</div>
<?php endwhile; ?>