-
Notifications
You must be signed in to change notification settings - Fork 0
/
page-blog.php
48 lines (41 loc) · 1.21 KB
/
page-blog.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
41
42
43
44
45
46
47
48
<?php
/**
* Template Name: Page Blog
*
* @author Julian Dawson <[email protected]>
* @license MIT License
* @link https://github.com/carlislephoto/carlislephoto-org-uk-theme
*
* @package WordPress
* @subpackage CarlislePhoto
*/
get_header();
while ( have_posts() ) : the_post(); ?>
<main class="c-band c-band--tall">
<div class="o-wrapper">
<?php
/**
* Get all posts.
*/
$carlislephoto_posts = get_posts();
foreach( $carlislephoto_posts as $post ) : setup_postdata($post); ?>
<article class="o-teaser">
<a class="o-teaser__link" href="<?php the_permalink() ?>">
<div class="o-teaser__media">
<?php the_post_thumbnail( 'carlislephoto-flex-thumbnail' ); ?>
</div>
<div class="o-teaser__content">
<div class="o-teaser__meta">
<div class="o-teaser__badge [ c-badge c-badge--blog-post ]">Blog</div>
<time class="o-teaser__date"><?php the_time('j F Y'); ?></time>
</div>
<h2 class="o-teaser__headline"><?php the_title(); ?></h2>
<?php the_excerpt(); ?>
</div>
</a>
</article>
<?php endforeach; wp_reset_postdata(); ?>
</div>
</main>
<?php endwhile;
get_footer(); ?>