Skip to content

Commit 83570b5

Browse files
setup baseline template for Course Index context
1 parent c6353db commit 83570b5

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

src/page_course.php

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<?php /* Template Name: Index - Course */ ?>
2+
3+
<?php get_header('', array( 'body-classes' => '') ); ?>
4+
5+
<main>
6+
7+
<?php while ( have_posts() ) : the_post(); ?>
8+
9+
<header>
10+
11+
<h1><?php the_title(); ?></h1>
12+
13+
<?php if (!class_exists('ACF')): ?>
14+
15+
<!-- display raw post_meta, if ACF not installed & activated -->
16+
<?php if ( get_post_meta( get_the_ID(), 'lead_in_copy', true ) ) : ?>
17+
<p><?php echo get_post_meta( get_the_ID(), 'lead_in_copy', true ); ?></p>
18+
<?php endif; ?>
19+
20+
<?php else : ?>
21+
22+
<!-- display ACF field, if ACF installed & activated -->
23+
<?php if ( get_field('lead_in_copy') ) : ?>
24+
<p><?php the_field('lead_in_copy'); ?></p>
25+
<?php endif; ?>
26+
27+
<?php endif; ?>
28+
29+
</header>
30+
31+
32+
<?php if (get_field('display_sidebar')) : ?>
33+
34+
<?php get_sidebar(); ?>
35+
36+
<?php endif; ?>
37+
38+
39+
<div class="content">
40+
41+
<?php the_content(); ?>
42+
43+
</div>
44+
45+
<?php endwhile; // end of the loop. ?>
46+
47+
</main>
48+
49+
<?php get_footer(); ?>

0 commit comments

Comments
 (0)