-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
38 lines (37 loc) · 1.09 KB
/
index.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
<?php /* Default Page Template */ ?>
<?php
get_header();
?>
<?php
while (have_posts()) : the_post();
?>
<div class="parallax-container valign-wrapper">
<div class="parallax">
<!--show hero image -->
<?php $hero = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full'); ?>
<!-- get the alt image else take the title as a alt of the image-->
<?php
$alt=get_the_post_thumbnail_caption();
if ($alt != get_the_post_thumbnail_caption()) {
$alt = get_the_title();
}
?>
<img src="<?php echo $hero['0'];?>" alt="<?php echo $alt?> ">
</div>
</div>
<h1 class="center">
<?php echo the_title();?>
</h1>
<div class="container">
<div class="row">
<div class="col s12 offset-l2 l8">
<?php the_content();?>
</div>
</div>
</div>
<?php
endwhile;
?>
<?php
get_footer();
?>