-
Notifications
You must be signed in to change notification settings - Fork 0
/
single.php
executable file
·54 lines (37 loc) · 1.15 KB
/
single.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
49
50
51
52
53
54
<?php
/**
* The single post template.
*
* Used when a single post is queried.
*
* @package F1 Mission Bit
* @author Factor1 Studios
* @since 0.0.1
*/
get_header();
if( have_posts() ) : while( have_posts() ) : the_post();
$image = get_post_thumbnail_id();
$img = featuredURL('text_columns_split');
$alt = get_post_meta($image, '_wp_attachment_image_alt', true);
// Conditional classes
$colClass = $image ? '8' : '10'; ?>
<section class="centered-text-block">
<div class="container">
<div class="row row--justify-content-center row--align-items-center">
<?php if( $image ) : ?>
<div class="col-2 sm-col-4 single__meta">
<img src="<?php echo $img; ?>" alt="<?php echo $alt; ?>">
</div>
<?php endif; ?>
<div class="col-<?php echo $colClass; ?> sm-col-7 single__meta">
<a href="<?php the_permalink(); ?>"><h3><?php the_title(); ?></h3></a>
<?php get_template_part('components/meta'); ?>
</div>
<div class="col-10">
<?php the_content(); ?>
</div>
</div>
</div>
</section>
<?php endwhile; endif;
get_footer(); ?>