-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontent.php
35 lines (24 loc) · 925 Bytes
/
content.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
<?php
if (has_post_thumbnail()) : ?>
<figure class="grid__item">
<?php the_post_thumbnail('thumbnail'); ?>
<figcaption class="meta">
<div class="meta__container">
<h2 class="meta__title text--normal playfair-display m-0"><?php the_title_attribute(); ?></h2>
<?php
$categories = get_the_category();
foreach ($categories as $cat) {
if ($cat->name != "All") {
$category = $cat;
}
}
?>
<div class="meta__subcontainer">
<h3 class="meta__category text--normal m-0"><?php echo $category->name; ?></h3>
</div>
</div>
<a class="meta__link" href="<?php the_permalink(); ?>"></a>
</figcaption>
</figure>
<?php
endif;