/
page.php
48 lines (46 loc) · 1.4 KB
/
page.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
get_header();
?>
<div class="page-container row-fluid">
<div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<?php if ( have_posts() ) : ?>
<div class="row-fluid">
<?php if(get_field('upload_header_image')):?>
<div class="bgimg">
<div class="container">
<h1 class="heading-title"><?php the_title()?></h1>
</div>
</div>
<style>
.bgimg{
background: url('<?php the_field('upload_header_image')?>') no-repeat center center;
background-size:cover;
}
</style>
<?php else:?>
<div class="bgimg">
<div class="container">
<h1 class="heading-title"><?php the_title()?></h1>
</div>
</div>
<style>
.bgimg{
background: url('<?php echo esc_url( get_template_directory_uri() ); ?>/images/header-blog.jpg') no-repeat center center;
background-size:cover;
}
</style>
<?php endif;?>
</div>
<div class="container">
<?php while(have_posts()) : the_post();?>
<div class="page-entry-content">
<?php the_content();?>
</div> <!-- end entry-content -->
<?php endwhile;?>
</div>
<?php else : ?>
<?php get_template_part('not', 'found')?>
<?php endif; // end have_posts() check ?>
</div>
</div><!-- end page-container -->
<?php get_footer();?>