@@ -1,28 +1,28 @@ discard block |
||
1 | -<?php if ( have_posts() ): ?> |
|
1 | +<?php if (have_posts()): ?> |
|
2 | 2 | <div class="wrap"> |
3 | - <?php while ( have_posts() ) : the_post(); ?> |
|
4 | - <article <?php post_class( 'article' ); ?>> |
|
5 | - <?php if ( has_post_thumbnail() ) : ?> |
|
3 | + <?php while (have_posts()) : the_post(); ?> |
|
4 | + <article <?php post_class('article'); ?>> |
|
5 | + <?php if (has_post_thumbnail()) : ?> |
|
6 | 6 | <figure class="post--thumbnail"> |
7 | - <?php the_post_thumbnail( 'large' ); $background_image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large' ); ?> |
|
7 | + <?php the_post_thumbnail('large'); $background_image = wp_get_attachment_image_src(get_post_thumbnail_id(), 'large'); ?> |
|
8 | 8 | <style> |
9 | 9 | @media screen and (max-width: 48em) { |
10 | 10 | body { |
11 | - background: url(<?php echo array_shift( $background_image ); ?>) no-repeat; |
|
11 | + background: url(<?php echo array_shift($background_image); ?>) no-repeat; |
|
12 | 12 | background-size: contain; |
13 | 13 | } |
14 | 14 | } |
15 | 15 | </style> |
16 | 16 | <?php |
17 | - $attachment = get_post( get_post_thumbnail_id() ); |
|
18 | - echo apply_filters( 'the_content', $attachment->post_excerpt ); |
|
17 | + $attachment = get_post(get_post_thumbnail_id()); |
|
18 | + echo apply_filters('the_content', $attachment->post_excerpt); |
|
19 | 19 | ?> |
20 | 20 | </figure> |
21 | 21 | <?php endif ?> |
22 | 22 | <header> |
23 | 23 | <h1 class="page--title"><?php the_title(); ?></h1> |
24 | - <time datetime="<?php echo get_the_date( 'c' ); ?>"><?php the_date(); ?></time><span class="author"><?php the_author(); ?></span> |
|
25 | - <?php edit_post_link( 'Edit' ); ?> |
|
24 | + <time datetime="<?php echo get_the_date('c'); ?>"><?php the_date(); ?></time><span class="author"><?php the_author(); ?></span> |
|
25 | + <?php edit_post_link('Edit'); ?> |
|
26 | 26 | </header> |
27 | 27 | |
28 | 28 | <?php the_content() ?> |
@@ -30,14 +30,14 @@ discard block |
||
30 | 30 | <footer> |
31 | 31 | <?php |
32 | 32 | // If comments are open or we have at least one comment, load up the comment template. |
33 | - if ( comments_open() || get_comments_number() ) : |
|
33 | + if (comments_open() || get_comments_number()) : |
|
34 | 34 | comments_template(); |
35 | 35 | endif; ?> |
36 | 36 | </footer> |
37 | 37 | </article> |
38 | 38 | <?php endwhile ?> |
39 | 39 | <div class="widgets"> |
40 | - <?php dynamic_sidebar( 'slms_single_post' ); ?> |
|
40 | + <?php dynamic_sidebar('slms_single_post'); ?> |
|
41 | 41 | </div> |
42 | 42 | </div> |
43 | 43 | <?php endif; |