-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathloop.php
31 lines (25 loc) · 1.34 KB
/
loop.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
<?php if (have_posts()): while (have_posts()) : the_post(); ?>
<div class="column padding--small flex flex--direction-column flex--grow margin--bottom-default">
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" class=""><h4 class="margin--bottom-tiny"><?php the_title(); ?></h4></a>
<?php
$categories = get_the_category();
if ( ! empty( $categories ) ) {
echo '<h5 class="text--grey">» ';
echo esc_html( $categories[0]->name );
echo '</h5>';
}
?>
<?php if ( has_post_thumbnail()) : // Check if Thumbnail exists ?>
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" class="bg--color-blue"><?php the_post_thumbnail('pattern__thumbnail', ['class' => 'ui__thumbnail transition--scale-down', 'title' => 'Feature image']); // Fullsize image for the single post ?></a>
<?php endif; ?>
<?php $meta = get_post_meta(get_the_ID(), '_yoast_wpseo_metadesc', true); ?>
<?php if($meta) {?>
<p class="margin--top-default"><?php echo $meta;?></p>
<?php } ?>
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" class="text--orange text--chevron text--small text--bold">Read more </a>
<hr class="hr hr--grey-light margin--top-small">
</div>
<?php endwhile; ?>
<?php else: ?>
<h2><?php _e( 'Sorry, nothing to display.', 'html5blank' ); ?></h2>
<?php endif; ?>