-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsingle.php
More file actions
executable file
·65 lines (42 loc) · 1.6 KB
/
single.php
File metadata and controls
executable file
·65 lines (42 loc) · 1.6 KB
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
55
56
57
58
59
60
61
62
63
64
65
<?php
/**
* General page template
*/
get_header(); ?>
<div id="content" class="site-content">
<?php while ( have_posts() ) : the_post(); ?>
<?php
$thumb_url = get_the_post_thumbnail_url( $post, 'full' );
$title = get_the_title(); // Could use 'the_title()' but this allows for override
$description = get_the_excerpt(); // Could use 'the_excerpt()' but this allows for override
$hero_class = $thumb_url ? 'ccl-c-hero ccl-has-image': 'ccl-c-hero';
?>
<article <?php post_class(); ?>>
<div class="<?php echo esc_attr( $hero_class ); ?>" style="background-image:url(<?php echo esc_url( $thumb_url ); ?>)">
<div class="ccl-c-hero__thumb" style="background-image:url(<?php echo esc_url( $thumb_url ); ?>)" role="presentaion"></div>
<div class="ccl-l-container">
<div class="ccl-l-row">
<div class="ccl-l-column ccl-l-span-third-lg">
<div class="ccl-c-hero__header">
<h1 class="ccl-c-hero__title"><?php echo apply_filters( 'the_title', $title ); ?></h1>
</div>
</div>
<div class="ccl-l-column ccl-l-span-two-thirds-lg">
<div class="ccl-c-hero__content">
<div class="ccl-h4 ccl-u-mt-0"><?php echo apply_filters( 'the_excerpt', $description ); ?></div>
</div>
</div>
</div>
</div>
</div>
<div class="ccl-l-container">
<div class="ccl-l-row">
<div class="ccl-c-entry-content ccl-l-column ccl-l-span-9-md ccl-u-my-2">
<?php the_content(); ?>
</div>
</div>
</div>
</article>
<?php endwhile; ?>
</div>
<?php get_footer();