-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathpage.php
47 lines (26 loc) · 845 Bytes
/
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
<?php get_header('', array( 'body-classes' => '') ); ?>
<main>
<?php while ( have_posts() ) : the_post(); ?>
<header>
<h1><?php the_title(); ?></h1>
<?php if (!class_exists('ACF')): ?>
<!-- display raw post_meta, if ACF not installed & activated -->
<?php if ( get_post_meta( get_the_ID(), 'lead_in_copy', true ) ) : ?>
<p><?php echo get_post_meta( get_the_ID(), 'lead_in_copy', true ); ?></p>
<?php endif; ?>
<?php else : ?>
<!-- display ACF field, if ACF installed & activated -->
<?php if ( get_field('lead_in_copy') ) : ?>
<p><?php the_field('lead_in_copy'); ?></p>
<?php endif; ?>
<?php endif; ?>
</header>
<?php if (get_field('display_sidebar')) : ?>
<?php get_sidebar(); ?>
<?php endif; ?>
<div class="content">
<?php the_content(); ?>
</div>
<?php endwhile; // end of the loop. ?>
</main>
<?php get_footer(); ?>